mirror of
https://github.com/triqs/dft_tools
synced 2025-01-03 10:05:49 +01:00
[cmake] Use GNUInstallDirs to obtain installation directories
This commit is contained in:
parent
e3b947aee8
commit
f6a2e9802a
@ -124,6 +124,9 @@ target_compile_options(${PROJECT_NAME}_warnings
|
|||||||
$<$<CXX_COMPILER_ID:IntelLLVM>:-Wno-tautological-constant-compare>
|
$<$<CXX_COMPILER_ID:IntelLLVM>:-Wno-tautological-constant-compare>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Provide GNU Installation directories
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# #############
|
# #############
|
||||||
# Build Project
|
# Build Project
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ set_target_properties(${PROJECT_NAME}_c PROPERTIES
|
|||||||
VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||||
)
|
)
|
||||||
target_include_directories(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/c++>)
|
target_include_directories(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/c++>)
|
||||||
target_include_directories(${PROJECT_NAME}_c SYSTEM INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>)
|
target_include_directories(${PROJECT_NAME}_c SYSTEM INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_FULL_INCLUDEDIR}>)
|
||||||
target_compile_definitions(${PROJECT_NAME}_c PUBLIC
|
target_compile_definitions(${PROJECT_NAME}_c PUBLIC
|
||||||
APP4TRIQS_GIT_HASH=${PROJECT_GIT_HASH}
|
APP4TRIQS_GIT_HASH=${PROJECT_GIT_HASH}
|
||||||
TRIQS_GIT_HASH=${TRIQS_GIT_HASH}
|
TRIQS_GIT_HASH=${TRIQS_GIT_HASH}
|
||||||
@ -21,8 +21,8 @@ target_compile_definitions(${PROJECT_NAME}_c PUBLIC
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Install library and headers
|
# Install library and headers
|
||||||
install(TARGETS ${PROJECT_NAME}_c EXPORT ${PROJECT_NAME}-targets DESTINATION lib)
|
install(TARGETS ${PROJECT_NAME}_c EXPORT ${PROJECT_NAME}-targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")
|
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")
|
||||||
|
|
||||||
|
|
||||||
# ========= Static Analyzer Checks ==========
|
# ========= Static Analyzer Checks ==========
|
||||||
|
Loading…
Reference in New Issue
Block a user