yaml-cpp/CMakeLists.txt

40 lines
770 B
CMake
Raw Normal View History

cmake_minimum_required(VERSION 2.6)
project (YAML_CPP)
2009-05-30 06:41:27 +04:00
enable_testing()
if(WIN32)
set(_library_dir bin) # .dll are in PATH, like executables
else(WIN32)
set(_library_dir lib)
endif(WIN32)
#
set(_INSTALL_DESTINATIONS
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${_library_dir}${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
#
2009-05-30 02:55:59 +04:00
set(INCLUDE_INSTALL_DIR include/yaml-cpp)
2009-05-30 02:48:25 +04:00
file(GLOB public_headers include/*.h)
file(GLOB private_headers src/*.h)
file(GLOB sources src/*.cpp)
include_directories(${YAML_CPP_SOURCE_DIR}/include)
add_library(yaml-cpp
2009-05-30 02:48:25 +04:00
${public_headers}
${private_headers}
${sources}
)
install(TARGETS yaml-cpp ${_INSTALL_DESTINATIONS})
2009-05-30 02:55:59 +04:00
install(
FILES ${public_headers}
DESTINATION ${INCLUDE_INSTALL_DIR}
)
add_subdirectory (yaml-reader)
2009-05-30 02:48:25 +04:00