-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
37 lines (29 loc) · 885 Bytes
/
CMakeLists.txt
File metadata and controls
37 lines (29 loc) · 885 Bytes
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
cmake_minimum_required(VERSION 3.10)
# Set the project name and version
project(Glimpse VERSION 1.0)
# Option to build shared or static library
option(BUILD_STATIC_LIBS "Build using static libraries" ON)
# Automatically find all .cpp files in the src directory
file(GLOB SOURCES "src/*.cpp")
# Add the library target
if(BUILD_STATIC_LIBS)
add_library(Glimpse STATIC ${SOURCES})
else()
add_library(Glimpse SHARED ${SOURCES})
endif()
# Specify include directories
target_include_directories(Glimpse PUBLIC
${PROJECT_SOURCE_DIR}/include
)
# Optionally, set properties for the library
set_target_properties(Glimpse PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1
)
# Optionally, set installation rules
install(TARGETS Glimpse
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(DIRECTORY include/ DESTINATION include)