blob: 1908467086b22c65e2221764c5346a74153abb97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# We can't create the same interface imported target multiple times, CMake will complain if we do
# that. This can happen if the find_package call is done in multiple different subdirectories.
if(TARGET WrapDoubleConversion::WrapDoubleConversion)
set(WrapDoubleConversion_FOUND ON)
return()
endif()
set(WrapDoubleConversion_FOUND OFF)
find_package(double-conversion QUIET)
if (double-conversion_FOUND)
include(FeatureSummary)
set_package_properties(double-conversion PROPERTIES TYPE REQUIRED)
add_library(WrapDoubleConversion::WrapDoubleConversion INTERFACE IMPORTED)
target_link_libraries(WrapDoubleConversion::WrapDoubleConversion
INTERFACE double-conversion::double-conversion)
set(WrapDoubleConversion_FOUND ON)
return()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(WrapDoubleConversion DEFAULT_MSG WrapDoubleConversion_FOUND)
|