Skip to content

Commit

Permalink
configure_file() --> configure_package_config_file()
Browse files Browse the repository at this point in the history
  • Loading branch information
songweijia committed Feb 5, 2022
1 parent 8fe5af8 commit 6e359d4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,18 @@ export (EXPORT cascadeTargets
FILE "${CMAKE_CURRENT_BINARY_DIR}/cascade/cascadeTargets.cmake"
)

configure_file (cascadeConfig.cmake
#configure_file (cascadeConfig.cmake
# "${CMAKE_CURRENT_BINARY_DIR}/cascade/cascadeConfig.cmake"
#)

set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/cascade)

configure_package_config_file(cascadeConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/cascade/cascadeConfig.cmake"
INSTALL_DESTINATION ${ConfigPackageLocation}
PATH_VARS CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR ConfigPackageLocation
)

set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/cascade)
install(EXPORT cascadeTargets
FILE cascadeTargets.cmake
NAMESPACE derecho::
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ colorful_print() {
}

if [[ $# -lt 1 ]]; then
colorful_print orange "USAGE: $0 <Release|Debug|RelWithDebInfo|Benchmark|Clear> [USE_VERBS_API]"
colorful_print orange "USAGE: $0 <Release|Debug|RelWithDebInfo|Benchmark|Clean> [USE_VERBS_API]"
exit -1
fi

if [[ $1 == "Clear" ]]; then
if [[ $1 == "Clean" ]]; then
rm -rf build-*
exit 0
fi
Expand Down
2 changes: 0 additions & 2 deletions cascadeConfig.cmake

This file was deleted.

7 changes: 7 additions & 0 deletions cascadeConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@PACKAGE_INIT@

set_and_check(cascade_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set(cascade_LIBRARIES "-L@PACKAGE_CMAKE_INSTALL_LIBDIR@ -lcascade")
include("@PACKAGE_ConfigPackageLocation@/cascadeTargets.cmake")

check_required_components(cascade)

0 comments on commit 6e359d4

Please sign in to comment.