Remove valijson_INSTALL_HEADERS from cmake build

As the install is done separately from the build, no need to make header
installation optional.
This commit is contained in:
Jon Petrissans 2022-01-30 18:10:12 +01:00
parent bfb5860cbd
commit c7d5f2cbec

View File

@ -3,7 +3,6 @@ project(valijson)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(valijson_INSTALL_HEADERS "Install valijson headers." FALSE)
option(valijson_BUILD_EXAMPLES "Build valijson examples." FALSE)
option(valijson_BUILD_TESTS "Build valijson test suite." TRUE)
option(valijson_EXCLUDE_BOOST "Exclude Boost when building test suite." FALSE)
@ -35,9 +34,7 @@ target_include_directories(valijson INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
if(valijson_INSTALL_HEADERS)
install(DIRECTORY include/ DESTINATION include)
endif()
install(DIRECTORY include/ DESTINATION include)
if(NOT valijson_BUILD_TESTS AND NOT valijson_BUILD_EXAMPLES)
return()