summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2013-05-13 18:01:41 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2013-05-13 18:01:41 +0200
commita35a5394b0eb3978bd114afe8f1b7ff69ad6af62 (patch)
tree5c3471a7719f61bb76f107bbd3bfeabf034b0a24 /src
parentdeed5778e82c6833d804730a514b93bbafea3040 (diff)
downloadlibuca-a35a5394b0eb3978bd114afe8f1b7ff69ad6af62.tar.gz
libuca-a35a5394b0eb3978bd114afe8f1b7ff69ad6af62.tar.bz2
libuca-a35a5394b0eb3978bd114afe8f1b7ff69ad6af62.tar.xz
libuca-a35a5394b0eb3978bd114afe8f1b7ff69ad6af62.zip
Provide a macro for generating the enums
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 443025d..6d4d6b9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,29 +11,9 @@ set(uca_HDRS
uca-camera.h
uca-plugin-manager.h)
-# --- Generate enum file
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.h
- COMMAND ${GLIB2_MKENUMS}
- ARGS
- --template uca-enums.h.template
- ${UCA_ENUM_HDRS} > ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.h
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS ${UCA_ENUM_HDRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/uca-enums.h.template)
-
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.c
- COMMAND ${GLIB2_MKENUMS}
- ARGS
- --template uca-enums.c.template
- ${UCA_ENUM_HDRS} > ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.c
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS ${UCA_ENUM_HDRS}
- ${CMAKE_CURRENT_BINARY_DIR}/uca-enums.h
- ${CMAKE_CURRENT_SOURCE_DIR}/uca-enums.c.template
- )
-
+create_enums(uca-enums
+ ${CMAKE_CURRENT_SOURCE_DIR}/uca-enums
+ ${uca_HDRS})
# --- Configure ---------------------------------------------------------------