summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-05-09 19:01:48 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-05-09 19:01:48 (GMT)
commit2c3d682ddc3eac67962dc652a53e5e6239df5e43 (patch)
treeecc7b289e58214da2d2b68ace9e92698d6d2f654
parentcf2fb05be78c6b5f19be37d8b5a9bd65390ac707 (diff)
downloadlibkolabxml-2c3d682ddc3eac67962dc652a53e5e6239df5e43.tar.gz
less duplication
-rw-r--r--CMakeLists.txt31
1 files changed, 12 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2e89d0a..07194de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -144,28 +144,21 @@ add_custom_command(OUTPUT ${SCHEMA_SOURCEFILES}
VERBATIM
)
-# Compile Schemas
-
-if (XSDBIN_FOUND)
- add_custom_command(OUTPUT kolabformat-xcal-schema.cxx
- COMMAND ${XSDBIN} --verbose --array-name iCalendar_schema --output-dir ${CMAKE_BINARY_DIR} ${SCHEMAS}
- COMMENT "Compiling Kolab XSD schema"
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- DEPENDS ${SCHEMAS}
- VERBATIM
- )
-else (XSDBIN_FOUND)
+# Compile xsdbin if not found
+if (NOT XSDBIN_FOUND)
add_executable(xsdbin compiled/xsdbin.cxx)
target_link_libraries(xsdbin ${XERCES_C})
+ set(XSDBIN ${CMAKE_BINARY_DIR}/xsdbin)
+endif ()
- add_custom_command(OUTPUT kolabformat-xcal-schema.cxx
- COMMAND ${CMAKE_BINARY_DIR}/xsdbin --verbose --array-name iCalendar_schema --output-dir ${CMAKE_BINARY_DIR} ${SCHEMAS}
- COMMENT "Compiling Kolab XSD schema"
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- DEPENDS ${SCHEMAS} xsdbin
- VERBATIM
- )
-endif (XSDBIN_FOUND)
+# Compile Schemas
+add_custom_command(OUTPUT kolabformat-xcal-schema.cxx
+ COMMAND ${XSDBIN} --verbose --array-name iCalendar_schema --output-dir ${CMAKE_BINARY_DIR} ${SCHEMAS}
+ COMMENT "Compiling Kolab XSD schema"
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ DEPENDS ${SCHEMAS} ${XSDBIN}
+ VERBATIM
+ )
set( SCHEMA_SOURCEFILES ${SCHEMA_SOURCEFILES} ${CMAKE_BINARY_DIR}/kolabformat-xcal-schema.cxx)