diff options
author | Brad King <brad.king@kitware.com> | 2023-05-19 14:33:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-26 13:36:14 (GMT) |
commit | 5ec69eb58c4d863e9f8f278b7c78d08f8cedd3f4 (patch) | |
tree | 204366b19fba81e4374cd44cb5816e325bfb258f /Source | |
parent | 3381e6bd5cbfa1694f07c97a19747adda10b06f2 (diff) | |
download | CMake-5ec69eb58c4d863e9f8f278b7c78d08f8cedd3f4.zip CMake-5ec69eb58c4d863e9f8f278b7c78d08f8cedd3f4.tar.gz CMake-5ec69eb58c4d863e9f8f278b7c78d08f8cedd3f4.tar.bz2 |
cppdap: Build as part of CMake or use external installation
Add `cm3p/` headers to use the selected copy of the library.
Co-authored-by: Glen Chung <kuchung@microsoft.com>
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Modules/CMakeBuildUtilities.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Modules/CMakeBuildUtilities.cmake b/Source/Modules/CMakeBuildUtilities.cmake index d6e3e88..7d1e7da 100644 --- a/Source/Modules/CMakeBuildUtilities.cmake +++ b/Source/Modules/CMakeBuildUtilities.cmake @@ -376,3 +376,19 @@ if(BUILD_CursesDialog) message(FATAL_ERROR "CMAKE_USE_SYSTEM_FORM in ON but CURSES_FORM_LIBRARY is not set!") endif() endif() + +#--------------------------------------------------------------------- +# Build cppdap library. +if(CMake_ENABLE_CPPDAP) + if(CMAKE_USE_SYSTEM_CPPDAP) + find_package(cppdap CONFIG) + if(NOT cppdap_FOUND) + message(FATAL_ERROR + "CMAKE_USE_SYSTEM_CPPDAP is ON but a cppdap is not found!") + endif() + else() + add_subdirectory(Utilities/cmcppdap) + add_library(cppdap::cppdap ALIAS cmcppdap) + CMAKE_SET_TARGET_FOLDER(cppdap "Utilities/3rdParty") + endif() +endif() |