File: CMakeLists.txt

package info (click to toggle)
libsimpleini 4.17+dfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 684 kB
  • sloc: cpp: 4,569; makefile: 31
file content (24 lines) | stat: -rw-r--r-- 785 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cmake_minimum_required(VERSION 3.0)
project(simpleini)

include(GNUInstallDirs)

find_package(ICU COMPONENTS uc REQUIRED)

file(GLOB SOURCES "SimpleIni.cpp")
file(GLOB HEADERS "SimpleIni.h")

add_library(simpleini SHARED ${SOURCES})
set_target_properties(simpleini PROPERTIES VERSION "${SIMPLEINI_VERSION}" SOVERSION 1)

target_compile_definitions(simpleini PRIVATE SI_CONVERT_ICU SI_SUPPORT_IOSTREAMS)
target_link_libraries(simpleini ${ICU_LIBRARIES})

install(TARGETS simpleini DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

enable_testing()
add_executable(testsi test1.cpp testsi.cpp)
target_link_libraries(testsi simpleini)
add_test(NAME simpleini
         COMMAND testsi -u -m -l "${CMAKE_SOURCE_DIR}/test1-input.ini")