diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
commit | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (patch) | |
tree | 326578f0505cbed07cfe60de530022822dc237ac /app/wlib/gtklib/CMakeLists.txt | |
parent | 16e9630b79f0a7a90c6cedb6781175bb8b337dc1 (diff) |
New upstream version 5.1.0upstream/5.1.0
Diffstat (limited to 'app/wlib/gtklib/CMakeLists.txt')
-rw-r--r-- | app/wlib/gtklib/CMakeLists.txt | 68 |
1 files changed, 39 insertions, 29 deletions
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() |