Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Declare platform libraries to be explicitly static. #26

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
CMake: Declare platform libraries to be explicitly static.
The libraries declared in CMake using the custom `ADD_PLATFORM_LIBRARY`
function are intended for internal consumption by AusweisApp2.  These
libraries do NOT have a proper so-name, neither get properly installed
by CMake, nor header files for integration into external applications
are provided.

In most of the rpm-based Linux distributions the macroized invocation
of CMake assumes any non-explicitly as STATIC or OBJECT declared
library to be implicitly built as SHARED.

Thus libraries that are intended to be a 'platform' library for the
AusweisApp2 application need to be explicitly declared as STATIC.

Signed-off-by: Björn Esser <[email protected]>
  • Loading branch information
besser82 committed Jun 24, 2020
commit 266de500198b7abf752e157bec81367a7c075f0c
2 changes: 1 addition & 1 deletion cmake/Helper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ FUNCTION(ADD_PLATFORM_LIBRARY _name)
ENDIF()
ENDFOREACH()

ADD_LIBRARY(${_name} ${FILES})
ADD_LIBRARY(${_name} STATIC ${FILES})
TARGET_INCLUDE_DIRECTORIES(${_name} INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
IF(IOS)
SET_TARGET_PROPERTIES(${_name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
Expand Down