-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (38 loc) · 1.22 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 3.1.1 FATAL_ERROR)
# Git config
find_package(Git)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git" AND Git_FOUND)
execute_process(
COMMAND "${GIT_EXECUTABLE}" rev-list --count --topo-order v${VERSION_FULL}..HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
endif()
if(WIN32)
# Resource VersionInfo
set(PROJECT_PRODUCT_NAME "Peon Library")
set(PROJECT_COMPANY_NAME "Rodrigo Holztrattner Reis")
endif()
set(PROJECT_NAME "Peon")
set(PEON_FILES "Peon")
project(${PROJECT_NAME} VERSION 1.0.0 DESCRIPTION "blob")
add_library(${PROJECT_NAME} STATIC
Peon/PeonJob.cpp
Peon/PeonMemoryAllocator.cpp
Peon/PeonStealingQueue.cpp
Peon/PeonSystem.cpp
Peon/PeonWorker.cpp
)
# set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER Peon/Peon.h)
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT library)
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON)