Skip to content

Commit

Permalink
Merge pull request #169 from DARMA-tasking/168-fix-cmake-install-bug
Browse files Browse the repository at this point in the history
168 CMake: fix bugs in export and installation
  • Loading branch information
lifflander authored Dec 2, 2020
2 parents 27e6027 + cf70257 commit a2ef2da
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ target_include_directories(
$<INSTALL_INTERFACE:include>
)

if("${CMAKE_SOURCE_DIR}/src" STREQUAL PROJECT_SOURCE_DIR)
message(STATUS "Checkpoint: building as top-level")
else()
message(STATUS "Checkpoint: building as a sub-directory")
install(TARGETS detector EXPORT ${CHECKPOINT_LIBRARY})
set(DETECTOR_EXPORT detector)
endif()

install(
TARGETS ${CHECKPOINT_LIBRARY}
EXPORT ${CHECKPOINT_LIBRARY}
Expand All @@ -159,6 +167,7 @@ install(

export(
TARGETS ${CHECKPOINT_LIBRARY}
${DETECTOR_EXPORT}
FILE "checkpointTargets.cmake"
NAMESPACE vt::lib::
)

0 comments on commit a2ef2da

Please sign in to comment.