Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bctoolbox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
bctoolbox
Commits
1d12ff45
Commit
1d12ff45
authored
Feb 15, 2016
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more cleaning to CMakeLists.txt.
parent
b742a4cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
26 deletions
+21
-26
CMakeLists.txt
CMakeLists.txt
+13
-14
CMakeLists.txt
src/CMakeLists.txt
+8
-12
No files found.
CMakeLists.txt
View file @
1d12ff45
...
@@ -46,23 +46,20 @@ include(CMakePushCheckState)
...
@@ -46,23 +46,20 @@ include(CMakePushCheckState)
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
if
(
ENABLE_MBEDTLS
)
if
(
ENABLE_MBEDTLS
)
find_package
(
MbedTLS
)
find_package
(
MbedTLS
)
if
(
MBEDTLS_FOUND
)
if
(
MBEDTLS_FOUND
)
message
(
"Use mbedTLS"
)
message
(
"Use mbedTLS"
)
endif
()
endif
()
elseif
(
ENABLE_POLARSSL
)
endif
()
find_package
(
PolarSSL
)
if
(
ENABLE_POLARSSL AND NOT MBEDTLS_FOUND
)
if
(
POLARSSL_FOUND
)
find_package
(
PolarSSL REQUIRED
)
if
(
POLARSSL_FOUND
)
message
(
"Use polarSSL"
)
message
(
"Use polarSSL"
)
else
()
message
(
FATAL_ERROR
" No polarSSL or mbedTLS found"
)
endif
()
endif
()
else
()
message
(
FATAL_ERROR
"Neither polarSSL nor mbedTLS enabled"
)
endif
()
endif
()
if
(
HAVE_SSL_GET_DTLS_SRTP_PROTECTION_PROFILE
)
if
(
HAVE_SSL_GET_DTLS_SRTP_PROTECTION_PROFILE
)
message
(
"DTLS SRTP available"
)
message
(
"DTLS SRTP available"
)
set
(
HAVE_DTLS_SRTP 1
)
set
(
HAVE_DTLS_SRTP 1
)
else
()
else
()
...
@@ -74,10 +71,11 @@ set(exec_prefix ${prefix}/bin)
...
@@ -74,10 +71,11 @@ set(exec_prefix ${prefix}/bin)
set
(
libdir
${
prefix
}
/lib
)
set
(
libdir
${
prefix
}
/lib
)
set
(
includedir
${
prefix
}
/include
)
set
(
includedir
${
prefix
}
/include
)
if
(
ENABLE_MBEDTLS AND
MBEDTLS_FOUND
)
if
(
MBEDTLS_FOUND
)
get_filename_component
(
mbedtls_library_path
"
${
MBEDTLS_LIBRARIES
}
"
PATH
)
get_filename_component
(
mbedtls_library_path
"
${
MBEDTLS_LIBRARIES
}
"
PATH
)
set
(
LIBS_PRIVATE
"
${
LIBS_PRIVATE
}
-L
${
mbedlts_library_path
}
"
)
set
(
LIBS_PRIVATE
"
${
LIBS_PRIVATE
}
-L
${
mbedlts_library_path
}
"
)
elseif
(
ENABLE_POLARSSL AND POLARSSL_FOUND
)
endif
()
if
(
POLARSSL_FOUND
)
get_filename_component
(
polarssl_library_path
"
${
POLARSSL_LIBRARIES
}
"
PATH
)
get_filename_component
(
polarssl_library_path
"
${
POLARSSL_LIBRARIES
}
"
PATH
)
set
(
LIBS_PRIVATE
"
${
LIBS_PRIVATE
}
-L
${
polarssl_library_path
}
-lpolarssl"
)
set
(
LIBS_PRIVATE
"
${
LIBS_PRIVATE
}
-L
${
polarssl_library_path
}
-lpolarssl"
)
endif
()
endif
()
...
@@ -92,9 +90,10 @@ include_directories(
...
@@ -92,9 +90,10 @@ include_directories(
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
)
)
if
(
ENABLE_MBEDTLS AND
MBEDTLS_FOUND
)
if
(
MBEDTLS_FOUND
)
include_directories
(
${
MBEDTLS_INCLUDE_DIRS
}
)
include_directories
(
${
MBEDTLS_INCLUDE_DIRS
}
)
elseif
(
ENABLE_POLARSSL AND POLARSSL_FOUND
)
endif
()
if
(
POLARSSL_FOUND
)
include_directories
(
${
POLARSSL_INCLUDE_DIRS
}
)
include_directories
(
${
POLARSSL_INCLUDE_DIRS
}
)
endif
()
endif
()
...
...
src/CMakeLists.txt
View file @
1d12ff45
...
@@ -24,16 +24,11 @@
...
@@ -24,16 +24,11 @@
set
(
BCTOOLBOX_SOURCE_FILES
set
(
BCTOOLBOX_SOURCE_FILES
)
)
if
(
MBEDTLS_FOUND
)
list
(
APPEND BCTOOLBOX_SOURCE_FILES crypto_mbedtls.c
)
endif
()
if
(
POLARSSL_FOUND
)
if
(
POLARSSL_FOUND
)
set
(
BCTOOLBOX_SOURCE_FILES
list
(
APPEND BCTOOLBOX_SOURCE_FILES crypto_polarssl.c
)
${
BCTOOLBOX_SOURCE_FILES
}
crypto_polarssl.c
)
elseif
(
MBEDTLS_FOUND
)
set
(
BCTOOLBOX_SOURCE_FILES
${
BCTOOLBOX_SOURCE_FILES
}
crypto_mbedtls.c
)
endif
()
endif
()
if
(
ENABLE_STATIC
)
if
(
ENABLE_STATIC
)
...
@@ -53,12 +48,13 @@ else()
...
@@ -53,12 +48,13 @@ else()
endif
()
endif
()
if
(
MBEDTLS_FOUND
)
target_include_directories
(
bctoolbox PUBLIC
${
MBEDTLS_INCLUDE_DIRS
}
)
target_link_libraries
(
bctoolbox
${
MBEDTLS_LIBRARIES
}
)
endif
()
if
(
POLARSSL_FOUND
)
if
(
POLARSSL_FOUND
)
target_include_directories
(
bctoolbox PUBLIC
${
POLARSSL_INCLUDE_DIRS
}
)
target_include_directories
(
bctoolbox PUBLIC
${
POLARSSL_INCLUDE_DIRS
}
)
target_link_libraries
(
bctoolbox
${
POLARSSL_LIBRARIES
}
)
target_link_libraries
(
bctoolbox
${
POLARSSL_LIBRARIES
}
)
elseif
(
MBEDTLS_FOUND
)
target_include_directories
(
bctoolbox PUBLIC
${
MBEDTLS_INCLUDE_DIRS
}
)
target_link_libraries
(
bctoolbox
${
MBEDTLS_LIBRARIES
}
)
endif
()
endif
()
...
...
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