camel-gen-tables and gen-western-table are executed in the build process so they need to be built for the host architecture --- a/src/camel/CMakeLists.txt.orig 2018-10-27 15:24:42.168166299 +0200 +++ b/src/camel/CMakeLists.txt 2018-10-27 15:37:04.341765727 +0200 @@ -1,17 +1,10 @@ glib_mkenums(camel-enumtypes camel-enums.h CAMEL_ENUMTYPES_H) -add_executable(camel-gen-tables - camel-gen-tables.c -) - -target_include_directories(camel-gen-tables PUBLIC - ${CMAKE_BINARY_DIR} -) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables >${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c - DEPENDS camel-gen-tables + COMMAND /usr/bin/gcc ${CMAKE_CURRENT_SOURCE_DIR}/camel-gen-tables.c -I${CMAKE_BINARY_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables + && ${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables >${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c ) set(SOURCES --- a/src/addressbook/libebook-contacts/CMakeLists.txt.orig 2018-10-27 15:42:14.644088211 +0200 +++ b/src/addressbook/libebook-contacts/CMakeLists.txt 2018-10-27 15:45:43.359285829 +0200 @@ -2,31 +2,12 @@ add_pkgconfig_file(libebook-contacts.pc.in libebook-contacts-${API_VERSION}.pc) -add_executable(gen-western-table - gen-western-table.c -) - -target_compile_definitions(gen-western-table PRIVATE - -DG_LOG_DOMAIN=\"gen-western-table\" -) - -target_compile_options(gen-western-table PUBLIC - ${GNOME_PLATFORM_CFLAGS} -) - -target_include_directories(gen-western-table PUBLIC - ${CMAKE_BINARY_DIR} - ${GNOME_PLATFORM_INCLUDE_DIRS} -) - -target_link_libraries(gen-western-table - ${GNOME_PLATFORM_LDFLAGS} -) - add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gen-western-table "${CMAKE_CURRENT_SOURCE_DIR}/e-name-western-tables.h.in" >${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h - DEPENDS gen-western-table e-name-western-tables.h.in + COMMAND /usr/bin/gcc ${CMAKE_CURRENT_SOURCE_DIR}/gen-western-table.c -I${CMAKE_BINARY_DIR} + -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0 -o ${CMAKE_CURRENT_BINARY_DIR}/gen-western-table + && ${CMAKE_CURRENT_BINARY_DIR}/gen-western-table "${CMAKE_CURRENT_SOURCE_DIR}/e-name-western-tables.h.in" >${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h + DEPENDS e-name-western-tables.h.in ) set(DEPENDENCIES