Skip to content

Commit

Permalink
Merge pull request #39 from pinotree/gnuinstalldirs
Browse files Browse the repository at this point in the history
cmake: use GNUInstallDirs
  • Loading branch information
arximboldi authored Aug 7, 2023
2 parents 2d7d09e + adb4cf8 commit 24e6847
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments")
endif()

include(GNUInstallDirs)

option(zug_BUILD_TESTS "Build tests" ON)
option(zug_BUILD_EXAMPLES "Build examples" ON)
option(zug_BUILD_DOCS "Build docs" ON)
Expand All @@ -35,11 +37,11 @@ add_library(zug INTERFACE)
target_include_directories(zug INTERFACE
$<BUILD_INTERFACE:${zug_BINARY_DIR}/>
$<BUILD_INTERFACE:${zug_SOURCE_DIR}/>
$<INSTALL_INTERFACE:include>)
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

install(TARGETS zug EXPORT ZugConfig)
install(EXPORT ZugConfig DESTINATION lib/cmake/Zug)
install(DIRECTORY zug DESTINATION include)
install(EXPORT ZugConfig DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Zug")
install(DIRECTORY zug DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

enable_testing()
add_custom_target(check
Expand Down

0 comments on commit 24e6847

Please sign in to comment.