-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] cmake: fix static library build
- Loading branch information
Showing
3 changed files
with
60 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
include("${CMAKE_CURRENT_LIST_DIR}/libre.cmake") | ||
if("@LIBRE_BUILD_STATIC@") | ||
include(CMakeFindDependencyMacro) | ||
find_dependency(Threads) | ||
if("@USE_OPENSSL@") | ||
find_dependency(OpenSSL) | ||
endif() | ||
if("@ZLIB_FOUND@") | ||
find_dependency(ZLIB) | ||
endif() | ||
endif() | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/libre-targets.cmake") | ||
|
||
# convenience target libre::libre for uniform usage | ||
if(NOT TARGET libre::libre) | ||
if(TARGET libre::re_shared AND (BUILD_SHARED_LIBS OR NOT TARGET libre::re)) | ||
add_library(libre::libre INTERFACE IMPORTED) | ||
set_target_properties(libre::libre PROPERTIES INTERFACE_LINK_LIBRARIES libre::re_shared) | ||
elseif(TARGET libre::re AND (NOT BUILD_SHARED_LIBS OR NOT TARGET libre::re_shared)) | ||
add_library(libre::libre INTERFACE IMPORTED) | ||
set_target_properties(libre::libre PROPERTIES INTERFACE_LINK_LIBRARIES libre::re) | ||
endif() | ||
endif() |
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