cmake: Add 3rd party public include directories
Add the possibility to distinguish between public and non-public include directories. Public directories are the one to use to access definitions of 3rd party code interfaces. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
00f5b8cd63
commit
f19f312aa6
3 changed files with 7 additions and 1 deletions
2
3rdparty/CMakeLists.txt
vendored
2
3rdparty/CMakeLists.txt
vendored
|
@ -1,5 +1,6 @@
|
|||
list (APPEND thirdparty_src)
|
||||
list (APPEND thirdparty_lib)
|
||||
list (APPEND thirdparty_inc_public)
|
||||
list (APPEND thirdparty_inc)
|
||||
list (APPEND thirdparty_def)
|
||||
|
||||
|
@ -11,5 +12,6 @@ endif()
|
|||
|
||||
set(thirdparty_src ${thirdparty_src} PARENT_SCOPE)
|
||||
set(thirdparty_lib ${thirdparty_lib} PARENT_SCOPE)
|
||||
set(thirdparty_inc_public ${thirdparty_inc_public} PARENT_SCOPE)
|
||||
set(thirdparty_inc ${thirdparty_inc} PARENT_SCOPE)
|
||||
set(thirdparty_def ${thirdparty_def} PARENT_SCOPE)
|
||||
|
|
5
3rdparty/everest/CMakeLists.txt
vendored
5
3rdparty/everest/CMakeLists.txt
vendored
|
@ -1,4 +1,5 @@
|
|||
list (APPEND everest_src)
|
||||
list (APPEND everest_inc_public)
|
||||
list (APPEND everest_inc)
|
||||
list (APPEND everest_def)
|
||||
|
||||
|
@ -8,7 +9,8 @@ set(everest_src
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/library/Hacl_Curve25519_joined.c
|
||||
)
|
||||
|
||||
list(APPEND everest_inc ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include/everest ${CMAKE_CURRENT_SOURCE_DIR}/include/everest/kremlib)
|
||||
list(APPEND everest_inc_public ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
list(APPEND everest_inc ${CMAKE_CURRENT_SOURCE_DIR}/include/everest ${CMAKE_CURRENT_SOURCE_DIR}/include/everest/kremlib)
|
||||
|
||||
if(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
|
@ -21,5 +23,6 @@ if(INSTALL_MBEDTLS_HEADERS)
|
|||
endif(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
set(thirdparty_src ${thirdparty_src} ${everest_src} PARENT_SCOPE)
|
||||
set(thirdparty_inc_public ${thirdparty_inc_public} ${everest_inc_public} PARENT_SCOPE)
|
||||
set(thirdparty_inc ${thirdparty_inc} ${everest_inc} PARENT_SCOPE)
|
||||
set(thirdparty_def ${thirdparty_def} ${everest_def} PARENT_SCOPE)
|
||||
|
|
|
@ -219,6 +219,7 @@ endif(ENABLE_ZLIB_SUPPORT)
|
|||
add_subdirectory(include)
|
||||
|
||||
add_subdirectory(3rdparty)
|
||||
include_directories(${thirdparty_inc_public})
|
||||
include_directories(${thirdparty_inc})
|
||||
list(APPEND libs ${thirdparty_lib})
|
||||
add_definitions(${thirdparty_def})
|
||||
|
|
Loading…
Reference in a new issue