-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (22 loc) · 1000 Bytes
/
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
cmake_minimum_required(VERSION 3.9)
project(milch VERSION 1.0.1 DESCRIPTION "a simple gui lib for c++")
include(GNUInstallDirs)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
add_library(${PROJECT_NAME} SHARED
src/window.cpp
src/color.cpp
)
include_directories(${PROJECT_NAME} include/)
target_link_libraries(${PROJECT_NAME} "-lX11")
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER include/milch/milch.h)
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
option(MILCH_BUILD_EXAMPLES "Build milch examples." OFF)
if(MILCH_BUILD_EXAMPLES)
add_subdirectory(examples/)
endif()