Skip to content

Commit

Permalink
cmake: use relative path CMAKE_* variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Baker committed Jan 31, 2024
1 parent da0962a commit e62ba9a
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ endif()
target_include_directories(nanothread
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

target_compile_definitions(nanothread PRIVATE -DNANOTHREAD_BUILD=1)
set_target_properties(nanothread PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
Expand All @@ -76,31 +76,25 @@ if (NANOTHREAD_ENABLE_TESTS)
endif()

configure_file(nanothreadConfig.cmake "${CMAKE_CURRENT_BINARY_DIR}/nanothread/nanothreadConfig.cmake" COPYONLY)
install(
FILES
nanothreadConfig.cmake
DESTINATION
lib/cmake/nanothread
)
install(
TARGETS
nanothread
EXPORT
nanothreadTargets
INCLUDES DESTINATION
include
${CMAKE_INSTALL_INCLUDEDIR}
)
install(
DIRECTORY
include/nanothread
DESTINATION
include
${CMAKE_INSTALL_INCLUDEDIR}
)
install(
EXPORT
nanothreadTargets
FILE
nanothreadTargets.cmake
DESTINATION
lib/cmake/nanothread
${CMAKE_INSTALL_LIBDIR}/cmake/nanothread
)

0 comments on commit e62ba9a

Please sign in to comment.