Fix a few of the Wrap modules to protect against double creation of
targets. This created issues when trying to build standalone examples. Change-Id: Iaaea2b537793ae25fbf3143cc205574446aa4ad1 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
This commit is contained in:
parent
37467028bb
commit
ace5495870
@ -1,3 +1,10 @@
|
||||
# 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 Atomic)
|
||||
set(Atomic_FOUND ON)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
set (atomic_test_sources "#include <atomic>
|
||||
|
@ -1,3 +1,10 @@
|
||||
# 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()
|
||||
|
||||
add_library(WrapDoubleConversion::WrapDoubleConversion INTERFACE IMPORTED)
|
||||
|
||||
find_package(double-conversion)
|
||||
|
@ -1,3 +1,10 @@
|
||||
# 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 WrapRt)
|
||||
set(WrapRt_FOUND ON)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
include(CMakePushCheckState)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user