First check the CMake Package Registry for CUnit
This is useful when building CycloneDDS on platforms that provide CMake configuration for CUnit outside of Conan. If no configuration is found in the system CMake registry the module continues as before. Co-authored-by: Steven! Ragnarök <steven@nuclearsandwich.com> Signed-off-by: Scott K Logan <logans@cottsay.net>
This commit is contained in:
parent
41d36d59b2
commit
1cc6caff14
1 changed files with 25 additions and 19 deletions
|
@ -9,6 +9,11 @@
|
|||
#
|
||||
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
#
|
||||
find_package(CUnit CONFIG QUIET)
|
||||
if(CUnit_FOUND)
|
||||
message(STATUS "Found CUnit via Config file: ${CUnit_DIR}")
|
||||
set(CUNIT_FOUND ${CUnit_FOUND})
|
||||
else()
|
||||
set(CUNIT_HEADER "CUnit/CUnit.h")
|
||||
|
||||
if(CONAN_INCLUDE_DIRS)
|
||||
|
@ -35,6 +40,7 @@ if(CONAN_LIB_DIRS)
|
|||
else()
|
||||
find_library(CUNIT_LIBRARY cunit)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue