Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mbedtls
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
external
mbedtls
Commits
ba2c8763
Commit
ba2c8763
authored
Jun 25, 2015
by
Manuel Pégourié-Gonnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: adjust libraries linking
parent
c8293b20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
25 deletions
+18
-25
CMakeLists.txt
library/CMakeLists.txt
+18
-25
No files found.
library/CMakeLists.txt
View file @
ba2c8763
...
...
@@ -86,10 +86,6 @@ set(src
${
src_tls
}
)
if
(
WIN32
)
set
(
libs ws2_32
)
endif
(
WIN32
)
if
(
CMAKE_COMPILER_IS_GNUCC
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wmissing-declarations -Wmissing-prototypes"
)
endif
(
CMAKE_COMPILER_IS_GNUCC
)
...
...
@@ -98,13 +94,27 @@ if(CMAKE_COMPILER_IS_CLANG)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wmissing-declarations -Wmissing-prototypes -Wdocumentation -Wno-documentation-deprecated-sync -Wunreachable-code"
)
endif
(
CMAKE_COMPILER_IS_CLANG
)
if
(
WIN32
)
set
(
libs
${
libs
}
ws2_32
)
endif
(
WIN32
)
if
(
USE_PKCS11_HELPER_LIBRARY
)
set
(
libs
${
libs
}
pkcs11-helper
)
endif
(
USE_PKCS11_HELPER_LIBRARY
)
if
(
ENABLE_ZLIB_SUPPORT
)
set
(
libs
${
libs
}
${
ZLIB_LIBRARIES
}
)
endif
(
ENABLE_ZLIB_SUPPORT
)
if
(
LINK_WITH_PTHREAD
)
set
(
libs
${
libs
}
pthread
)
endif
()
if
(
NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY
)
message
(
FATAL_ERROR
"Need to choose static or shared mbedtls build!"
)
endif
(
NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY
)
if
(
USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY
)
# if we build both static an shared, then let
# tests and programs link to the shared lib target
set
(
mbedtls_static_target
"mbedtls_static"
)
elseif
(
USE_STATIC_MBEDTLS_LIBRARY
)
set
(
mbedtls_static_target
"mbedtls"
)
...
...
@@ -115,33 +125,16 @@ if(USE_STATIC_MBEDTLS_LIBRARY)
set_target_properties
(
${
mbedtls_static_target
}
PROPERTIES OUTPUT_NAME mbedtls
)
target_link_libraries
(
${
mbedtls_static_target
}
${
libs
}
)
if
(
ZLIB_FOUND
)
target_link_libraries
(
${
mbedtls_static_target
}
${
ZLIB_LIBRARIES
}
)
endif
(
ZLIB_FOUND
)
if
(
LINK_WITH_PTHREAD
)
target_link_libraries
(
${
mbedtls_static_target
}
pthread
)
endif
()
install
(
TARGETS
${
mbedtls_static_target
}
DESTINATION
${
LIB_INSTALL_DIR
}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
DESTINATION
${
LIB_INSTALL_DIR
}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif
()
if
(
USE_SHARED_MBEDTLS_LIBRARY
)
add_library
(
mbedtls SHARED
${
src
}
)
set_target_properties
(
mbedtls PROPERTIES VERSION 1.4.0 SOVERSION 8
)
target_link_libraries
(
mbedtls
${
libs
}
)
if
(
ZLIB_FOUND
)
target_link_libraries
(
mbedtls
${
ZLIB_LIBRARIES
}
)
endif
(
ZLIB_FOUND
)
if
(
LINK_WITH_PTHREAD
)
target_link_libraries
(
mbedtls pthread
)
endif
()
install
(
TARGETS mbedtls
DESTINATION
${
LIB_INSTALL_DIR
}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment