Last change
on this file since 2130 was
2130,
checked in by rgrieder, 15 years ago
|
Trunk should be functional again with these changes
|
File size:
789 bytes
|
Line | |
---|
1 | MACRO(ADD_SOURCE_DIRECTORY _target_list _directory) |
---|
2 | |
---|
3 | # Subfolder puts source files into CMake Cache variable _CACHED_SOURCE_FILES |
---|
4 | ADD_SUBDIRECTORY(${_directory}) |
---|
5 | |
---|
6 | # Put the directory name in front of each source file from the subfolder |
---|
7 | # and add it to the source list in the current directory |
---|
8 | FOREACH(_source_file ${_CACHED_SOURCE_FILES}) |
---|
9 | LIST(APPEND ${_target_list} "${_directory}/${_source_file}") |
---|
10 | ENDFOREACH(_source_file) |
---|
11 | |
---|
12 | ENDMACRO(ADD_SOURCE_DIRECTORY) |
---|
13 | |
---|
14 | |
---|
15 | MACRO(ADD_SOURCE_FILES _source_list) |
---|
16 | |
---|
17 | # Put the source file into a variable that still exists in this_folder/../ |
---|
18 | # Use FORCE to always overwrite the cache variable |
---|
19 | SET(_CACHED_SOURCE_FILES ${${_source_list}} CACHE STRING "" FORCE) |
---|
20 | MARK_AS_ADVANCED(_CACHED_SOURCE_FILES FORCE) |
---|
21 | |
---|
22 | ENDMACRO(ADD_SOURCE_FILES) |
---|
Note: See
TracBrowser
for help on using the repository browser.