summaryrefslogtreecommitdiff
path: root/app/wlib/gtklib/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'app/wlib/gtklib/CMakeLists.txt')
-rw-r--r--app/wlib/gtklib/CMakeLists.txt68
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()