From d1a8285f818eb7e5c3d6a05709ea21a808490b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 19 Mar 2018 19:55:58 +0100 Subject: New upstream version 5.1.0 --- app/wlib/gtklib/CMakeLists.txt | 68 ++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 29 deletions(-) (limited to 'app/wlib/gtklib/CMakeLists.txt') diff --git a/app/wlib/gtklib/CMakeLists.txt b/app/wlib/gtklib/CMakeLists.txt index a8cae9f..bf20e91 100644 --- a/app/wlib/gtklib/CMakeLists.txt +++ b/app/wlib/gtklib/CMakeLists.txt @@ -1,9 +1,7 @@ +# Setup GTK UI library... +file(GLOB headers *.h) -FILE(GLOB HEADERS *.h) - -INCLUDE (FindGTKUnixPrint.cmake) - -SET(SOURCES +set(sources bitmap.c boxes.c button.c @@ -25,6 +23,7 @@ SET(SOURCES print.c single.c splash.c + statusbar.c text.c timer.c tooltip.c @@ -32,32 +31,43 @@ SET(SOURCES util.c window.c wpref.c -# cproto and cppcheck - # end of refactored sources gtkdraw-cairo.c ) -IF(APPLE) - SET(SOURCES - ${SOURCES} - osxhelp.c) - -ELSE(APPLE) - SET(SOURCES - ${SOURCES} - ixhelp.c) -ENDIF(APPLE) - -SET_SOURCE_FILES_PROPERTIES(wpref.c PROPERTIES COMPILE_FLAGS -DEXPORT=) - -INCLUDE_DIRECTORIES(${XTrkCAD_BINARY_DIR}) -INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS}) -INCLUDE_DIRECTORIES(${GTK_UNIX_PRINT_INCLUDE_DIRS}) -INCLUDE_DIRECTORIES(${GTK_WEBKIT_INCLUDE_DIRS}) - -ADD_LIBRARY(xtrkcad-wlib ${HEADERS} ${SOURCES}) -TARGET_LINK_LIBRARIES(xtrkcad-wlib ${GTK_LIBRARIES}) -TARGET_LINK_LIBRARIES(xtrkcad-wlib ${GTK_UNIX_PRINT_LIBRARIES}) -TARGET_LINK_LIBRARIES(xtrkcad-wlib ${GTK_WEBKIT_LIBRARIES}) +# help system is OS and build specific, add appropriate source files +if(APPLE) + set(sources + ${sources} + osxhelp.c) +else() + if(XTRKCAD_USE_BROWSER) + set(sources + ${sources} + browserhelp.c) + else() + set(sources + ${sources} + ixhelp.c) + endif() +endif() + +include_directories(${XTrkCAD_BINARY_DIR}) + +add_library(xtrkcad-wlib ${headers} ${sources}) + +# GTK +include_directories(${GTK_INCLUDE_DIRS}) +target_link_libraries(xtrkcad-wlib ${GTK_LIBRARIES}) + +# configure for GTK's native Unix print +find_package (GTKUnixPrint) +include_directories(${GTK_UNIX_PRINT_INCLUDE_DIRS}) +target_link_libraries(xtrkcad-wlib ${GTK_UNIX_PRINT_LIBRARIES}) + +# add dependency to webkit if configured +if(NOT XTRKCAD_USE_BROWSER) + include_directories(${GTK_WEBKIT_INCLUDE_DIRS}) + target_link_libraries(xtrkcad-wlib ${GTK_WEBKIT_LIBRARIES}) +endif() -- cgit v1.2.3