Skip to content

Commit b04f1bf

Browse files
committed
CMake: It is now possible to have a user folder with Tasks, libraries and configuration files.
Use the same tree as the main dune directory (user/etc/ user/src/ and user/vendor/). This change allows developers to synchronize with LSTS's repo more easily.
1 parent 8c36d12 commit b04f1bf

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ private/
77
.\#*
88
*.mo
99
CMakeLists.txt.user
10+
user/

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ foreach(extlib ${extlibs})
213213
include(${extlib})
214214
endforeach(extlib ${extlibs})
215215

216+
# User Libraries.
217+
file(GLOB extlibs ${PROJECT_SOURCE_DIR}/user/vendor/libraries/*/Library.cmake)
218+
foreach(extlib ${extlibs})
219+
include(${extlib})
220+
endforeach(extlib ${extlibs})
221+
216222
include_directories(${DUNE_GENERATED}/src ${PROJECT_SOURCE_DIR}/src ${DUNE_VENDOR_INCS_DIR})
217223
link_directories(${DUNE_VENDOR_LIBS_DIR})
218224
set(DUNE_CORE_FILES ${DUNE_CORE_SOURCES} ${DUNE_VENDOR_FILES})

cmake/I18N.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ if(DUNE_PROGRAM_XGETTEXT)
5353
file(GLOB_RECURSE sources "${PROJECT_SOURCE_DIR}/src/*.cpp")
5454
file(GLOB_RECURSE private_headers "${PROJECT_SOURCE_DIR}/private/src/*.hpp")
5555
file(GLOB_RECURSE private_sources "${PROJECT_SOURCE_DIR}/private/src/*.cpp")
56+
file(GLOB_RECURSE user_headers "${PROJECT_SOURCE_DIR}/private/src/*.hpp")
57+
file(GLOB_RECURSE user_sources "${PROJECT_SOURCE_DIR}/private/src/*.cpp")
5658
file(GLOB_RECURSE texts "${PROJECT_SOURCE_DIR}/i18n/*.txt")
5759

5860
add_custom_target(i18n_extract
@@ -68,7 +70,7 @@ if(DUNE_PROGRAM_XGETTEXT)
6870
--keyword=DTR_RT
6971
--no-wrap
7072
--indent
71-
-o dune.pot ${headers} ${sources} ${private_headers} ${private_sources} ${texts}
73+
-o dune.pot ${headers} ${sources} ${private_headers} ${private_sources} ${user_headers} ${user_sources} ${texts}
7274
DEPENDS i18n_texts
7375
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/i18n)
7476
endif(DUNE_PROGRAM_XGETTEXT)

cmake/Tasks.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ if(TASK_FILE)
170170
else(TASK_FILE)
171171
dune_add_tasks(${PROJECT_SOURCE_DIR}/src)
172172
dune_add_tasks(${PROJECT_SOURCE_DIR}/private/src)
173+
dune_add_tasks(${PROJECT_SOURCE_DIR}/user/src)
173174
endif(TASK_FILE)
174175

175176
list(SORT DUNE_TASKS_ENABLED)

0 commit comments

Comments
 (0)