mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Make use of CMAKE_CURRENT_SOURCE_DIR, improve maintainability
This commit is contained in:
parent
2b30b95a8f
commit
08889f238b
@ -4,17 +4,17 @@
|
||||
# SPDX-FileCopyrightText: 2010-2020 C. Fernandez-Prades cfernandez(at)cttc.es
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
file(GLOB ASN_RRLP_SOURCES "${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp/*.c")
|
||||
file(GLOB ASN_RRLP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/asn-rrlp/*.c")
|
||||
list(SORT ASN_RRLP_SOURCES)
|
||||
file(GLOB ASN_RRLP_HEADERS "${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp/*.h")
|
||||
file(GLOB ASN_RRLP_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/asn-rrlp/*.h")
|
||||
list(SORT ASN_RRLP_HEADERS)
|
||||
file(GLOB ASN_SUPL_SOURCES "${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl/*.c")
|
||||
file(GLOB ASN_SUPL_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/asn-supl/*.c")
|
||||
list(SORT ASN_SUPL_SOURCES)
|
||||
file(GLOB ASN_SUPL_HEADERS "${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl/*.h")
|
||||
file(GLOB ASN_SUPL_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/asn-supl/*.h")
|
||||
list(SORT ASN_SUPL_HEADERS)
|
||||
file(GLOB ASN_TYPES_SOURCES "${CMAKE_SOURCE_DIR}/src/core/libs/supl/types/*.c")
|
||||
file(GLOB ASN_TYPES_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/types/*.c")
|
||||
list(SORT ASN_TYPES_SOURCES)
|
||||
file(GLOB ASN_TYPES_HEADERS "${CMAKE_SOURCE_DIR}/src/core/libs/supl/types/*.h")
|
||||
file(GLOB ASN_TYPES_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/types/*.h")
|
||||
list(SORT ASN_TYPES_HEADERS)
|
||||
|
||||
if(USE_CMAKE_TARGET_SOURCES)
|
||||
@ -60,12 +60,20 @@ target_include_directories(core_libs_supl
|
||||
PUBLIC
|
||||
${GNUTLS_INCLUDE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
|
||||
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
|
||||
${CMAKE_SOURCE_DIR}/src/core/libs/supl/types
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/asn-supl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/asn-rrlp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/types
|
||||
)
|
||||
|
||||
set_target_properties(core_libs_supl PROPERTIES
|
||||
LINKER_LANGUAGE C
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl;${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp;${CMAKE_SOURCE_DIR}/src/core/libs/supl/types;${GNUTLS_INCLUDE_DIR}"
|
||||
set_property(TARGET core_libs_supl
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/asn-supl>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/asn-rrlp>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/types>
|
||||
$<BUILD_INTERFACE:${GNUTLS_INCLUDE_DIR}>
|
||||
)
|
||||
|
||||
set_property(TARGET core_libs_supl
|
||||
APPEND PROPERTY LINKER_LANGUAGE C
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user