27 lines
606 B
CMake
27 lines
606 B
CMake
cmake_minimum_required(VERSION 3.0)
|
|
project(conf-c)
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
#set(CMAKE_C_FLAGS_RELEASE "$ENV${CFLAGS} -O3 -Wall")
|
|
|
|
include_directories(src)
|
|
|
|
add_subdirectory(src)
|
|
add_subdirectory(example)
|
|
|
|
# uninstall target
|
|
if(NOT TARGET uninstall)
|
|
configure_file(
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
IMMEDIATE @ONLY)
|
|
|
|
add_custom_target(uninstall
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
|
endif()
|
|
|
|
include (CTest)
|
|
|
|
add_test(example example/example)
|
|
|