Commit 27f0411c authored by David E. DeMarle's avatar David E. DeMarle

add a way for projects to ask xdmf NOT to install its headers

While a development install needs to put them in place so that
users can compile new code against xdmf, a runtime install has
no need for them.
parent d7a44681
......@@ -63,6 +63,8 @@ endif()
include(XdmfFunctions)
option(XDMF_INSTALL_NO_DEVELOPMENT "Prevent install from writing out developement files." OFF)
mark_as_advanced(XDMF_INSTALL_NO_DEVELOPMENT)
# Converting Install Prefix to an absolute path
get_filename_component(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
......@@ -478,7 +480,9 @@ if(NOT XDMF_BUILD_CORE_ONLY)
"CMake/VersionSuite/*.hpp"
"${CMAKE_CURRENT_BINARY_DIR}/*.hpp"
)
install(FILES ${XdmfHeaders} DESTINATION include)
if (NOT XDMF_INSTALL_NO_DEVELOPMENT)
install(FILES ${XdmfHeaders} DESTINATION include)
endif()
install(TARGETS ${XDMF_LIBNAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
......
......@@ -310,9 +310,10 @@ file(GLOB LokiHeaders loki/*.h)
set(XdmfCoreHeaders
${XdmfCoreHeaders}
${CMAKE_CURRENT_BINARY_DIR}/XdmfCoreConfig.hpp)
install(FILES ${XdmfCoreHeaders} DESTINATION include)
install(FILES ${LokiHeaders} DESTINATION include/loki)
if (NOT XDMF_INSTALL_NO_DEVELOPMENT)
install(FILES ${XdmfCoreHeaders} DESTINATION include)
install(FILES ${LokiHeaders} DESTINATION include/loki)
endif()
install(TARGETS XdmfCore
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment