Mercurial > hg > orthanc
annotate Resources/CMake/AutoGeneratedCode.cmake @ 1432:0ac74fa21db8
rename IServerIndexListener as IDatabaseListener
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Jun 2015 12:51:29 +0200 |
parents | efc448de0899 |
children | bf9b8bfea0e7 |
rev | line source |
---|---|
0 | 1 set(AUTOGENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/AUTOGENERATED") |
2 set(AUTOGENERATED_SOURCES) | |
3 | |
4 file(MAKE_DIRECTORY ${AUTOGENERATED_DIR}) | |
5 include_directories(${AUTOGENERATED_DIR}) | |
6 | |
7 macro(EmbedResources) | |
8 # Convert a semicolon separated list to a whitespace separated string | |
9 set(SCRIPT_ARGUMENTS) | |
10 set(DEPENDENCIES) | |
11 set(IS_PATH_NAME false) | |
12 foreach(arg ${ARGN}) | |
13 if (${IS_PATH_NAME}) | |
291
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
14 list(APPEND SCRIPT_ARGUMENTS "${arg}") |
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
15 list(APPEND DEPENDENCIES "${arg}") |
0 | 16 set(IS_PATH_NAME false) |
17 else() | |
18 list(APPEND SCRIPT_ARGUMENTS "${arg}") | |
19 set(IS_PATH_NAME true) | |
20 endif() | |
21 endforeach() | |
22 | |
23 set(TARGET_BASE "${AUTOGENERATED_DIR}/EmbeddedResources") | |
24 add_custom_command( | |
25 OUTPUT | |
26 "${TARGET_BASE}.h" | |
27 "${TARGET_BASE}.cpp" | |
28 COMMAND | |
1339
a87d3288bd39
autodetect python binary
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
29 ${PYTHON_EXECUTABLE} |
1418 | 30 "${ORTHANC_ROOT}/Resources/EmbedResources.py" |
0 | 31 "${AUTOGENERATED_DIR}/EmbeddedResources" |
32 ${SCRIPT_ARGUMENTS} | |
33 DEPENDS | |
1418 | 34 "${ORTHANC_ROOT}/Resources/EmbedResources.py" |
0 | 35 ${DEPENDENCIES} |
36 ) | |
37 | |
38 list(APPEND AUTOGENERATED_SOURCES | |
39 "${AUTOGENERATED_DIR}/EmbeddedResources.cpp" | |
40 ) | |
41 endmacro() |