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.txt48
1 files changed, 36 insertions, 12 deletions
diff --git a/app/wlib/gtklib/CMakeLists.txt b/app/wlib/gtklib/CMakeLists.txt
index bf20e91..97ab56f 100644
--- a/app/wlib/gtklib/CMakeLists.txt
+++ b/app/wlib/gtklib/CMakeLists.txt
@@ -18,6 +18,7 @@ set(sources
menu.c
message.c
notice.c
+ opendocument.c
pixbuf.c
png.c
print.c
@@ -35,29 +36,43 @@ set(sources
gtkdraw-cairo.c
)
-
# help system is OS and build specific, add appropriate source files
if(APPLE)
- set(sources
- ${sources}
- osxhelp.c)
-else()
+ if (XTRKCAD_USE_APPLEHELP)
+ set(sources
+ ${sources}
+ osxhelp.c)
+ else(XTRKCAD_USE_APPLEHELP)
+ if(XTRKCAD_USE_BROWSER)
+ set(sources
+ ${sources}
+ browserhelp.c)
+ else(XTRKCAD_USE_BROWSER)
+ PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0" REQUIRED)
+ set(sources
+ ${sources}
+ ixhelp.c)
+ endif(XTRKCAD_USE_BROWSER)
+ endif(XTRKCAD_USE_APPLEHELP)
+else(APPLE)
if(XTRKCAD_USE_BROWSER)
set(sources
${sources}
browserhelp.c)
- else()
+ else(XTRKCAD_USE_BROWSER)
+ PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0" REQUIRED)
set(sources
${sources}
ixhelp.c)
- endif()
-endif()
+ endif(XTRKCAD_USE_BROWSER)
+endif(APPLE)
include_directories(${XTrkCAD_BINARY_DIR})
add_library(xtrkcad-wlib ${headers} ${sources})
# GTK
+find_package (GTK2)
include_directories(${GTK_INCLUDE_DIRS})
target_link_libraries(xtrkcad-wlib ${GTK_LIBRARIES})
@@ -67,7 +82,16 @@ 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()
+if (APPLE)
+ if(NOT XTRKCAD_USE_APPLEHELP)
+ if(NOT XTRKCAD_USE_BROWSER)
+ include_directories(${GTK_WEBKIT_INCLUDE_DIRS})
+ target_link_libraries(xtrkcad-wlib ${GTK_WEBKIT_LIBRARIES})
+ endif()
+ endif()
+else (APPLE)
+ if(NOT XTRKCAD_USE_BROWSER)
+ include_directories(${GTK_WEBKIT_INCLUDE_DIRS})
+ target_link_libraries(xtrkcad-wlib ${GTK_WEBKIT_LIBRARIES})
+ endif()
+endif(APPLE)