-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (25 loc) · 1.13 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
cmake_minimum_required(VERSION 3.21)
project(UntitledCLIParser VERSION 3.0.0.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_C_STANDARD 99)
include_directories(.)
set(UCLI_LIBRARY_TYPE "SHARED")
if (BUILD_VARIANT_STATIC)
set(UCLI_LIBRARY_TYPE "STATIC")
endif()
set(UCLI_C_HEADERS "C/cucli.h")
set(UCLI_HEADERS "Common.h" "CLIParser.hpp")
add_library(UntitledCLIParser ${UCLI_LIBRARY_TYPE} C/cucli.cpp CLIParser.cpp ${UCLI_HEADERS} ${UCLI_C_HEADERS})
target_compile_definitions(UntitledCLIParser PRIVATE MLS_EXPORT_LIBRARY MLS_LIB_COMPILE)
target_compile_definitions(UntitledCLIParser PUBLIC UIMGUI_CLI_PARSER_MODULE_ENABLED)
list(APPEND compile_defs "UIMGUI_CLI_PARSER_MODULE_ENABLED")
configure_file(UntitledCLIParser.pc.in UntitledCLIParser.pc @ONLY)
if (UIMGUI_INSTALL)
install(TARGETS UntitledCLIParser
LIBRARY DESTINATION lib64/
ARCHIVE DESTINATION lib64/)
install(FILES ${UCLI_HEADERS} DESTINATION include/UntitledCLIParser)
install(FILES ${UCLI_C_HEADERS} DESTINATION include/UntitledCLIParser/C)
install(FILES ${PROJECT_BINARY_DIR}/UntitledCLIParser.pc
DESTINATION lib/pkgconfig/)
endif()