0029684: Configuration: modification of build Inspector tool standalone on occt
[occt.git] / samples / tools / TStandalone / adm / cmake / standalone_macros.cmake
1 #freeimage
2
3 macro (FIND_SOURCES_AND_HEADERS_FILES CURRENT_SOURCES_DIR SOURCE_FILES HEADER_FILES)
4   if (EXISTS "${CURRENT_SOURCES_DIR}/FILES")
5     file (STRINGS "${CURRENT_SOURCES_DIR}/FILES" HEADER_FILES_H REGEX ".+[.]h")
6     file (STRINGS "${CURRENT_SOURCES_DIR}/FILES" SOURCE_FILES_C REGEX ".+[.]c")
7
8     if (NOT "${HEADER_FILES_H}" STREQUAL "")
9       foreach (ORIGIN_FILE ${HEADER_FILES_H})
10         list (APPEND HEADER_FILES_ ${CURRENT_SOURCES_DIR}/${ORIGIN_FILE})
11       endforeach()
12
13       #message("${HEADER_FILES_}")
14       set(${HEADER_FILES} ${HEADER_FILES_})
15     endif()
16
17     if(NOT "${SOURCE_FILES_C}" STREQUAL "")
18       foreach (ORIGIN_FILE ${SOURCE_FILES_C})
19         list (APPEND SOURCE_FILES_ ${CURRENT_SOURCES_DIR}/${ORIGIN_FILE})
20       endforeach()
21
22       #message("${SOURCE_FILES_}")
23       set(${SOURCE_FILES} ${SOURCE_FILES_})
24     endif()
25
26     #set(${HEADER_FILES} ${HEADER_FILES_H})
27     #set(${SOURCE_FILES} ${SOURCE_FILES_C})
28
29   else()
30     message(WARNING "file FILES is absent in $TARGET")
31   endif()
32
33 endmacro()