diff --git a/CMakeDocs.txt b/CMakeDocs.txt index 6f969be..8c23df7 100644 --- a/CMakeDocs.txt +++ b/CMakeDocs.txt @@ -14,3 +14,4 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc/klib) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man DESTINATION share) endif () + diff --git a/CMakeLists.txt b/CMakeLists.txt index 553d599..3976276 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,7 @@ write_basic_package_version_file( COMPATIBILITY AnyNewerVersion ) +if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) add_custom_target(cloc COMMAND cloc ${SOURCE_FILES} ${HEADER_FILES} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) @@ -96,3 +97,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/klib.pc DESTINATION lib/pkgconfig) include(CMakePack.txt) include(CMakeDocs.txt) +endif() diff --git a/CMakePack.txt b/CMakePack.txt index 7e97535..9c46fba 100644 --- a/CMakePack.txt +++ b/CMakePack.txt @@ -32,4 +32,5 @@ set(CPACK_SOURCE_IGNORE_FILES /.*build.*) include (CPack) -add_custom_target(package_docs DEPENDS klib_docs package package_source) \ No newline at end of file +add_custom_target(package_docs DEPENDS klib_docs package package_source) +