void-packages/srcpkgs/libical/patches/fix-cross.patch

25 lines
1.0 KiB
Diff

diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt
index f0eaf01..5fc7cc2 100644
--- a/src/libical-glib/CMakeLists.txt
+++ b/src/libical-glib/CMakeLists.txt
@@ -1,16 +1,10 @@
add_definitions(-Dlibical_ical_EXPORTS)
-# build the src-generator
-add_executable(src-generator
- tools/generator.c
- tools/generator.h
- tools/xml-parser.c
- tools/xml-parser.h
+add_custom_command(
+ OUTPUT ${EXECUTABLE_OUTPUT_PATH}/src-generator
+ COMMAND /usr/bin/cc ${CMAKE_CURRENT_SOURCE_DIR}/tools/generator.c ${CMAKE_CURRENT_SOURCE_DIR}/tools/xml-parser.c -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I${CMAKE_CURRENT_SOURCE_DIR}/tools/ -lxml2 -lglib-2.0 -o ${EXECUTABLE_OUTPUT_PATH}/src-generator
)
-target_compile_options(src-generator PUBLIC ${GLIB_CFLAGS} ${LIBXML_CFLAGS} -DG_LOG_DOMAIN=\"src-generator\")
-target_link_libraries(src-generator ${GLIB_LIBRARIES} ${LIBXML_LIBRARIES})
-
list(APPEND API_FILES
api/i-cal-array.xml
api/i-cal-attach.xml