From 8beb70e1a6b02dff9cab59945ebce48a9bd77bf8 Mon Sep 17 00:00:00 2001 From: Bader Date: Sat, 30 Sep 2023 15:46:54 +0100 Subject: [PATCH] Changed CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR for users that use tgbotxx as submodule --- cmake/install.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/install.cmake b/cmake/install.cmake index 96d260463..f67919e06 100644 --- a/cmake/install.cmake +++ b/cmake/install.cmake @@ -4,8 +4,8 @@ include(GNUInstallDirs) # Use standard CMake directory variables # Install header files (our headers & lib single headers) -install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tgbotxx DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -install(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/json/include/nlohmann DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/tgbotxx DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/json/include/nlohmann DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) # Enable position-independent code for shared libraries set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -33,7 +33,7 @@ write_basic_package_version_file("${PROJECT_BINARY_DIR}/tgbotxx-config-version.c ) install( FILES - ${CMAKE_SOURCE_DIR}/cmake/tgbotxx-config.cmake + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/tgbotxx-config.cmake ${PROJECT_BINARY_DIR}/tgbotxx-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/tgbotxx