-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build shared and static libs separately
- Loading branch information
Showing
23 changed files
with
291 additions
and
470 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,5 @@ | ||
add_library(soci_shared_interface INTERFACE) | ||
add_library(SOCI::shared::soci ALIAS soci_shared_interface) | ||
|
||
add_library(soci_static_interface INTERFACE) | ||
add_library(SOCI::static::soci ALIAS soci_static_interface) | ||
|
||
add_library(soci_interface INTERFACE) | ||
add_library(SOCI::soci ALIAS soci_interface) | ||
|
||
if (SOCI_STATIC AND SOCI_SHARED) | ||
if (BUILD_SHARED_LIBS) | ||
target_link_libraries(soci_interface INTERFACE SOCI::shared::soci) | ||
else() | ||
target_link_libraries(soci_interface INTERFACE SOCI::static::soci) | ||
endif() | ||
elseif(SOCI_STATIC) | ||
target_link_libraries(soci_interface INTERFACE SOCI::static::soci) | ||
else() | ||
target_link_libraries(soci_interface INTERFACE SOCI::shared::soci) | ||
endif() | ||
|
||
|
||
add_subdirectory(core) | ||
add_subdirectory(backends) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
add_library(soci_empty_interface INTERFACE) | ||
target_link_libraries(soci_empty_interface INTERFACE soci_core_interface) | ||
|
||
add_library(soci_empty_objects OBJECT | ||
"blob.cpp" | ||
"factory.cpp" | ||
"row-id.cpp" | ||
"session.cpp" | ||
"standard-into-type.cpp" | ||
"standard-use-type.cpp" | ||
"statement.cpp" | ||
"vector-into-type.cpp" | ||
"vector-use-type.cpp" | ||
add_library(soci_empty | ||
${SOCI_LIB_TYPE} | ||
"blob.cpp" | ||
"factory.cpp" | ||
"row-id.cpp" | ||
"session.cpp" | ||
"standard-into-type.cpp" | ||
"standard-use-type.cpp" | ||
"statement.cpp" | ||
"vector-into-type.cpp" | ||
"vector-use-type.cpp" | ||
) | ||
|
||
target_link_libraries(soci_empty_objects PUBLIC soci_empty_interface) | ||
target_link_libraries(soci_empty PUBLIC SOCI::Core) | ||
|
||
target_include_directories(soci_empty_objects | ||
target_include_directories(soci_empty | ||
PRIVATE | ||
"${PROJECT_SOURCE_DIR}/include/private" | ||
"${PROJECT_SOURCE_DIR}/include/soci" | ||
) | ||
|
||
soci_backend_objects_to_lib( | ||
OBJECT_LIB soci_empty_objects | ||
SHARED_TARGET_NAME soci_empty | ||
STATIC_TARGET_NAME soci_empty_static | ||
ALIAS_NAME Empty | ||
SHARED_DEPS SOCI::shared::Core | ||
STATIC_DEPS SOCI::static::Core | ||
) | ||
add_library(SOCI::Empty ALIAS soci_empty) | ||
|
||
target_link_libraries(soci_interface INTERFACE SOCI::Empty) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.