summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/cmarkConfig.cmake.in2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2db94c4..48ddd01 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -141,9 +141,10 @@ if(CMARK_SHARED OR CMARK_STATIC)
install(EXPORT cmark DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+ set(CMARK_TARGETS_FILE ${CMAKE_CURRENT_BINARY_DIR}/cmarkTargets.cmake)
configure_file(cmarkConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmarkConfig.cmake)
- export(TARGETS ${CMARK_INSTALL} FILE cmarkTargets.cmake)
+ export(TARGETS ${CMARK_INSTALL} FILE ${CMARK_TARGETS_FILE})
endif()
# Feature tests
diff --git a/src/cmarkConfig.cmake.in b/src/cmarkConfig.cmake.in
index 9aae8a9..37884c0 100644
--- a/src/cmarkConfig.cmake.in
+++ b/src/cmarkConfig.cmake.in
@@ -3,5 +3,5 @@ set(HAVE_LIBCMARK_SHARED @CMARK_SHARED@)
if((HAVE_LIBCMARK_STATIC AND NOT TARGET libcmark_static) OR
(HAVE_LIBCMARK_SHARED AND NOT TARGET libcmark))
- include(${CMAKE_CURRENT_LIST_DIR}/cmarkTargets.cmake)
+ include(@CMARK_TARGETS_FILE@)
endif()