Skip to content

Commit

Permalink
Changed CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR
Browse files Browse the repository at this point in the history
for users that use tgbotxx as submodule
  • Loading branch information
baderouaich committed Sep 30, 2023
1 parent 0f6062e commit 8beb70e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8beb70e

Please sign in to comment.