Skip to content

Commit

Permalink
fixed install script for apps
Browse files Browse the repository at this point in the history
As we do not export LIB PATH some libraries will be able to find package through cmake unless they hardcode their app to include LIB_PATH.
  • Loading branch information
hariharan-devarajan committed Aug 8, 2023
1 parent f65ca33 commit 263ab0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ write_basic_package_version_file(

set(gotcha_INSTALL_INCLUDE_DIR include/)
set(gotcha_INSTALL_LIB_DIR lib/)
set(gotcha_INSTALL_LIB64_DIR lib64/)

# Configure gotcha-config.cmake
configure_package_config_file(
Expand Down
3 changes: 2 additions & 1 deletion cmake/config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

set_and_check(gotcha_INCLUDE_DIR "@PACKAGE_gotcha_INSTALL_INCLUDE_DIR@")
set_and_check(gotcha_LIBRARIES_DIR "@PACKAGE_gotcha_INSTALL_LIB_DIR@")
set_and_check(gotcha_LIBRARIES64_DIR "@PACKAGE_gotcha_INSTALL_LIB64_DIR@")

if (NOT TARGET gotcha)
include(${CMAKE_CURRENT_LIST_DIR}/gotcha-targets.cmake)
endif()

set(gotcha_INCLUDE_DIRS ${gotcha_INCLUDE_DIR})
set(gotcha_LIBRARIES "-L${gotcha_LIBRARIES_DIR} -lgotcha")
set(gotcha_LIBRARIES "-L${gotcha_LIBRARIES_DIR} -L${gotcha_LIBRARIES64_DIR} -lgotcha")

check_required_components(gotcha)

0 comments on commit 263ab0c

Please sign in to comment.