cmake: only install json-schema.hpp if not a subdir

(install rule needs more work, however)
This commit is contained in:
Patrick Boettcher 2017-02-18 08:15:27 +01:00
parent d957c9f667
commit a013354bc6

View File

@ -35,12 +35,14 @@ target_link_libraries(json-schema-validator
PUBLIC
json-hpp)
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/src/json-schema-validator.hpp
DESTINATION
if(NOT TARGET json-hpp) # if used as a subdirectory do not install json-schema.hpp
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/src/json-schema.hpp
DESTINATION
${CMAKE_INSTALL_PREFIX}/include
)
)
endif()
# simple json-schema-validator-executable
add_executable(json-schema-validate app/json-schema-validate.cpp)