|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- cmake_minimum_required(VERSION 3.24)
- project(ini_config C)
- set(CMAKE_C_STANDARD 11)
-
- include(CTest)
-
- include_directories(
- "${CMAKE_HOME_DIRECTORY}/src"
- "${CMAKE_HOME_DIRECTORY}/minIni/dev"
- )
-
- add_library(
- ini_config STATIC
- minIni/dev/minIni.h
- minIni/dev/minIni.c
- src/ini-config.c
- src/ini-config.h
- src/types/int.c
- src/types/int.h
- src/types/string.c
- src/types/string.h
- )
-
- add_executable(
- test_int
- minIni/dev/minIni.h
- minIni/dev/minIni.c
- tests/test-int.c
- src/ini-config.c
- src/ini-config.h
- src/types/int.c
- src/types/int.h
- )
-
- set_target_properties (test_int PROPERTIES RUNTIME_OUTPUT_DIRECTORY tests)
-
- add_test(
- NAME test_int
- COMMAND test_int
- WORKING_DIRECTORY tests
- )
-
- add_custom_command(
- TARGET test_int POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${CMAKE_HOME_DIRECTORY}/fixtures/test-int.ini"
- $<TARGET_FILE_DIR:test_int>
- )
|