summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-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 ---------------------------------------------------------------