mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
Ensure find-modules can be called repeatedly
This commit is contained in:
@@ -94,7 +94,9 @@ find_package_handle_standard_args(DB2
|
||||
REQUIRED_VARS DB2_INCLUDE_DIRS DB2_LIBRARIES
|
||||
)
|
||||
|
||||
add_library(DB2 INTERFACE)
|
||||
target_link_libraries(DB2 INTERFACE ${DB2_LIBRARIES})
|
||||
target_include_directories(DB2 SYSTEM INTERFACE ${DB2_INCLUDE_DIRS})
|
||||
add_library(DB2::DB2 ALIAS DB2)
|
||||
if (DB2_FOUND AND NOT TARGET DB2)
|
||||
add_library(DB2 INTERFACE)
|
||||
target_link_libraries(DB2 INTERFACE ${DB2_LIBRARIES})
|
||||
target_include_directories(DB2 SYSTEM INTERFACE ${DB2_INCLUDE_DIRS})
|
||||
add_library(DB2::DB2 ALIAS DB2)
|
||||
endif()
|
||||
|
||||
@@ -42,7 +42,9 @@ find_package_handle_standard_args(Firebird
|
||||
REQUIRED_VARS Firebird_LIBRARIES Firebird_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
add_library(Firebird INTERFACE)
|
||||
target_link_libraries(Firebird INTERFACE ${Firebird_LIBRARIES})
|
||||
target_include_directories(Firebird SYSTEM INTERFACE ${Firebird_INCLUDE_DIRS})
|
||||
add_library(Firebird::Firebird ALIAS Firebird)
|
||||
if (Firebird_FOUND AND NOT TARGET Firebird)
|
||||
add_library(Firebird INTERFACE)
|
||||
target_link_libraries(Firebird INTERFACE ${Firebird_LIBRARIES})
|
||||
target_include_directories(Firebird SYSTEM INTERFACE ${Firebird_INCLUDE_DIRS})
|
||||
add_library(Firebird::Firebird ALIAS Firebird)
|
||||
endif()
|
||||
|
||||
@@ -95,11 +95,11 @@ include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Oracle
|
||||
REQUIRED_VARS Oracle_LIBRARIES Oracle_INCLUDE_DIRS)
|
||||
|
||||
if(Oracle_FOUND)
|
||||
if(Oracle_FOUND AND NOT TARGET Oracle)
|
||||
add_library(Oracle INTERFACE)
|
||||
target_link_libraries(Oracle INTERFACE ${Oracle_LIBRARIES})
|
||||
target_include_directories(Oracle SYSTEM INTERFACE ${Oracle_INCLUDE_DIRS})
|
||||
add_library(Oracle::Oracle ALIAS Oracle)
|
||||
else()
|
||||
elseif(NOT TARGET Oracle)
|
||||
message(STATUS "None of the supported Oracle versions (${Oracle_VERSIONS}) could be found, consider updating Oracle_VERSIONS if the version you use is not among them.")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user