forked from TriBITSPub/TriBITS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Factor longer parts out of base CMakeLists.raw.cmake to streamline (T…
…riBITSPub#582) This will allow me to exclude parts that I don't want to show in the developers guide. NOTE: The only reas the test file TribitsExampleProject2_Tests.cmake is updated is because I took 'a' out of 'in a raw'.
- Loading branch information
1 parent
32f8247
commit 56059fa
Showing
8 changed files
with
64 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
tribits/examples/TribitsExampleProject2/packages/package1/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...its/examples/TribitsExampleProject2/packages/package1/cmake/raw/DefineAllLibsTarget.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Generate the all_libs target(s) | ||
add_library(Package1_all_libs INTERFACE) | ||
set_target_properties(Package1_all_libs | ||
PROPERTIES EXPORT_NAME all_libs) | ||
target_link_libraries(Package1_all_libs | ||
INTERFACE Package1_package1) | ||
install(TARGETS Package1_all_libs | ||
EXPORT ${PROJECT_NAME} | ||
COMPONENT ${PROJECT_NAME} | ||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) | ||
add_library(Package1::all_libs ALIAS Package1_all_libs) |
10 changes: 10 additions & 0 deletions
10
...xamples/TribitsExampleProject2/packages/package1/cmake/raw/EnableTribitsTestSupport.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set(Package1_USE_TRIBITS_TEST_FUNCTIONS OFF CACHE BOOL | ||
"Use TriBITS testing functions") | ||
set(Package1_TRIBITS_DIR "" CACHE PATH | ||
"Path to TriBITS implementation base dir (e.g. TriBITS/tribits)") | ||
if (Package1_USE_TRIBITS_TEST_FUNCTIONS AND Package1_TRIBITS_DIR) | ||
# Pull in and turn on TriBITS testing support | ||
include("${Package1_TRIBITS_DIR}/core/test_support/TribitsAddTest.cmake") | ||
include("${Package1_TRIBITS_DIR}/core/test_support/TribitsAddAdvancedTest.cmake") | ||
set(Package1_ENABLE_TESTS ON) | ||
endif() |
13 changes: 13 additions & 0 deletions
13
...itsExampleProject2/packages/package1/cmake/raw/GeneratePackageConfigFileForBuildDir.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
if (COMMAND tribits_package) | ||
# Generate Package1Config.cmake file for the build tree (for internal | ||
# TriBITS-compliant package) | ||
set(packageBuildDirCMakePackagesDir | ||
"${${CMAKE_PROJECT_NAME}_BINARY_DIR}/cmake_packages/${PROJECT_NAME}") | ||
export(EXPORT ${PROJECT_NAME} | ||
NAMESPACE ${PROJECT_NAME}:: | ||
FILE "${packageBuildDirCMakePackagesDir}/${PROJECT_NAME}ConfigTargets.cmake" ) | ||
configure_file( | ||
"${CMAKE_CURRENT_LIST_DIR}/Package1Config.cmake.in" | ||
"${packageBuildDirCMakePackagesDir}/${PROJECT_NAME}/Package1Config.cmake" | ||
@ONLY ) | ||
endif() |
15 changes: 15 additions & 0 deletions
15
...sExampleProject2/packages/package1/cmake/raw/GeneratePackageConfigFileForInstallDir.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Generate and install the Package1Config.cmake file for the install tree | ||
# (needed for both internal and external TriBITS package) | ||
set(pkgConfigInstallDir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") | ||
install(EXPORT ${PROJECT_NAME} | ||
DESTINATION "${pkgConfigInstallDir}" | ||
NAMESPACE ${PROJECT_NAME}:: | ||
FILE ${PROJECT_NAME}ConfigTargets.cmake ) | ||
configure_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/raw/Package1Config.cmake.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Package1Config.install.cmake" | ||
@ONLY ) | ||
install( | ||
FILES "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Package1Config.install.cmake" | ||
RENAME "Package1Config.cmake" | ||
DESTINATION "${pkgConfigInstallDir}" ) |
8 changes: 4 additions & 4 deletions
8
tribits/examples/TribitsExampleProject2/packages/package1/test/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters