Commit a18ad1f6 authored by Ben Boeckel's avatar Ben Boeckel

cmake: use GNUInstallDirs for all install commands

parent cbc97d83
......@@ -258,11 +258,11 @@ if(XDMF_WRAP_JAVA)
endmacro()
endif()
include(GNUInstallDirs)
add_subdirectory(core)
include_directories(${XdmfCore_INCLUDE_DIRS} ${XdmfDSM_INCLUDE_DIRS})
include(GNUInstallDirs)
option(XDMF_BUILD_CORE_ONLY OFF)
mark_as_advanced(XDMF_BUILD_CORE_ONLY)
if(NOT XDMF_BUILD_CORE_ONLY)
......@@ -349,7 +349,7 @@ if(NOT XDMF_BUILD_CORE_ONLY)
"${CMAKE_CURRENT_BINARY_DIR}/*.hpp"
)
if (NOT XDMF_INSTALL_NO_DEVELOPMENT)
install(FILES ${XdmfHeaders} DESTINATION include)
install(FILES ${XdmfHeaders} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
install(TARGETS ${XDMF_LIBNAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
......
......@@ -177,8 +177,8 @@ set(XdmfCoreHeaders
${XdmfCoreHeaders}
${CMAKE_CURRENT_BINARY_DIR}/XdmfCoreConfig.hpp)
if (NOT XDMF_INSTALL_NO_DEVELOPMENT)
install(FILES ${XdmfCoreHeaders} DESTINATION include)
install(FILES ${LokiHeaders} DESTINATION include/loki)
install(FILES ${XdmfCoreHeaders} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES ${LokiHeaders} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/loki)
endif()
install(TARGETS XdmfCore
RUNTIME DESTINATION bin
......
......@@ -73,11 +73,11 @@ file(GLOB_RECURSE
XdmfDSMHeaders
"*.hpp" "*.tpp" "*.i"
"../../CMake/VersionSuite/*.hpp")
install(FILES ${XdmfDSMHeaders} DESTINATION include)
install(FILES ${XdmfDSMHeaders} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(TARGETS XdmfDSM
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(XDMF_BUILD_DSM_THREADS)
set(XdmfDSM_INCLUDE_DIRS
......
......@@ -144,10 +144,10 @@ endif(XDMF_BUILD_FORTRAN)
install(FILES ${XdmfUtilsHeaders} DESTINATION include)
install(TARGETS XdmfUtils
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS ${XdmfUtilsExecutables}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
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