-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE_PACKAGESConfig.cmake
36 lines (27 loc) · 1.19 KB
/
WORKSPACE_PACKAGESConfig.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
IF( NOT WORKSPACE_PACKAGES_PATH )
SET( WORKSPACE_PACKAGES_PATH ${NOVA_WORKSPACE_ROOT}/generated/packages )
ENDIF()
MESSAGE( STATUS "WORKSPACE_PACKAGES_PATH: ${WORKSPACE_PACKAGES_PATH}" )
MESSAGE( STATUS "WORKSPACE_PACKAGES_FIND_COMPONENTS: ${WORKSPACE_PACKAGES_FIND_COMPONENTS}" )
FOREACH(comp ${WORKSPACE_PACKAGES_FIND_COMPONENTS})
INCLUDE( "${WORKSPACE_PACKAGES_PATH}/${comp}/${comp}Config.cmake" )
#FIND_PACKAGE(comp CONFIG REQUIRED PATH ${WORKSPACE_PACKAGES_PATH}/${comp})
MESSAGE( STATUS "PACKAGE ${comp}: ${WORKSPACE_PACKAGES_${comp}_SOURCES}" )
FOREACH(source ${WORKSPACE_PACKAGES_${comp}_SOURCES})
LIST(APPEND WORKSPACE_PACKAGES_SOURCES ${source})
ENDFOREACH()
FOREACH(include ${WORKSPACE_PACKAGES_${comp}_INCLUDES})
LIST(APPEND WORKSPACE_PACKAGES_INCLUDES ${include})
ENDFOREACH()
STRING(TOUPPER "HAVE_PACKAGE_${comp}" TMP)
LIST(APPEND WORKSPACE_PACKAGES_DEFINITIONS ${TMP})
ENDFOREACH()
IF(WORKSPACE_PACKAGES_INCLUDES)
LIST(REMOVE_DUPLICATES WORKSPACE_PACKAGES_INCLUDES)
ENDIF()
IF(WORKSPACE_PACKAGES_SOURCES)
LIST(REMOVE_DUPLICATES WORKSPACE_PACKAGES_SOURCES)
ENDIF()
IF(WORKSPACE_PACKAGES_DEFINITIONS)
LIST(REMOVE_DUPLICATES WORKSPACE_PACKAGES_DEFINITIONS)
ENDIF()