Make use of system includes for cross-module optional.
This commit is contained in:
parent
2ddb6ac8c2
commit
2ee1224917
@ -13,13 +13,19 @@ macro (opm_compile opm)
|
|||||||
# all public header files are together with the source. prepend our own
|
# all public header files are together with the source. prepend our own
|
||||||
# source path to the one of the dependencies so that our version of any
|
# source path to the one of the dependencies so that our version of any
|
||||||
# ambigious paths are used.
|
# ambigious paths are used.
|
||||||
# set (${opm}_INCLUDE_DIR "${PROJECT_SOURCE_DIR}")
|
|
||||||
# set (${opm}_INCLUDE_DIRS ${${opm}_INCLUDE_DIR} ${${opm}_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
# create this library, if there are any compilation units
|
option(SILENCE_CROSSMODULE_WARNINGS "Disable warnings from cross-module includes" OFF)
|
||||||
# include_directories (${${opm}_INCLUDE_DIRS})
|
if (SILENCE_CROSSMODULE_WARNINGS)
|
||||||
include_directories("${PROJECT_SOURCE_DIR}")
|
include_directories("${PROJECT_SOURCE_DIR}")
|
||||||
include_directories (SYSTEM ${${opm}_INCLUDE_DIRS})
|
include_directories (SYSTEM ${${opm}_INCLUDE_DIRS})
|
||||||
|
else()
|
||||||
|
set (${opm}_INCLUDE_DIR "${PROJECT_SOURCE_DIR}")
|
||||||
|
set (${opm}_INCLUDE_DIRS ${${opm}_INCLUDE_DIR} ${${opm}_INCLUDE_DIRS})
|
||||||
|
include_directories (${${opm}_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# create this library, if there are any compilation units
|
||||||
link_directories (${${opm}_LIBRARY_DIRS})
|
link_directories (${${opm}_LIBRARY_DIRS})
|
||||||
add_definitions (${${opm}_DEFINITIONS})
|
add_definitions (${${opm}_DEFINITIONS})
|
||||||
set (${opm}_VERSION "${${opm}_VERSION_MAJOR}.${${opm}_VERSION_MINOR}")
|
set (${opm}_VERSION "${${opm}_VERSION_MAJOR}.${${opm}_VERSION_MINOR}")
|
||||||
|
Loading…
Reference in New Issue
Block a user