mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Patched CMake file to allow flexibility in build (in particular to allow shared lib build)
This commit is contained in:
@@ -4,8 +4,18 @@ project (YAML_CPP)
|
|||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
set(LIBRARY_OUTPUT_PATH lib${LIB_SUFFIX})
|
if(WIN32)
|
||||||
set(LIB_INSTALL_DIR lib${LIB_SUFFIX})
|
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}
|
||||||
|
)
|
||||||
|
#
|
||||||
set(INCLUDE_INSTALL_DIR include/yaml-cpp)
|
set(INCLUDE_INSTALL_DIR include/yaml-cpp)
|
||||||
|
|
||||||
file(GLOB public_headers include/*.h)
|
file(GLOB public_headers include/*.h)
|
||||||
@@ -19,11 +29,7 @@ add_library(yaml-cpp
|
|||||||
${sources}
|
${sources}
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(TARGETS yaml-cpp ${_INSTALL_DESTINATIONS})
|
||||||
TARGETS yaml-cpp
|
|
||||||
LIBRARY ARCHIVE
|
|
||||||
DESTINATION ${LIB_INSTALL_DIR}
|
|
||||||
)
|
|
||||||
install(
|
install(
|
||||||
FILES ${public_headers}
|
FILES ${public_headers}
|
||||||
DESTINATION ${INCLUDE_INSTALL_DIR}
|
DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||||
|
Reference in New Issue
Block a user