diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-07-03 10:19:36 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-07-03 10:19:36 +0200 |
commit | b6bd52cd7330a90fc0e44dbe6022551a8dd768a1 (patch) | |
tree | 9804282102f8c40d27407b9c94119b35eeb5013c /app/wlib/gtklib/CMakeLists.txt | |
parent | c9d0740841fbe0539e42e66d3865672bfcd3ac02 (diff) | |
parent | a14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 (diff) |
Update upstream source from tag 'upstream/5.3.0GA'
Update to upstream version '5.3.0GA'
with Debian dir dfd14d63b0238e276ade6f54dd9100325df5b2f9
Diffstat (limited to 'app/wlib/gtklib/CMakeLists.txt')
-rw-r--r-- | app/wlib/gtklib/CMakeLists.txt | 101 |
1 files changed, 60 insertions, 41 deletions
diff --git a/app/wlib/gtklib/CMakeLists.txt b/app/wlib/gtklib/CMakeLists.txt index 117772a..6c673d9 100644 --- a/app/wlib/gtklib/CMakeLists.txt +++ b/app/wlib/gtklib/CMakeLists.txt @@ -1,7 +1,12 @@ # Setup GTK UI library... -file(GLOB headers *.h) -set(sources +target_include_directories(xtrkcad-wlib + PRIVATE + ${xtrkcad-lib_SOURCE_DIR} +) + +target_sources(xtrkcad-wlib + PRIVATE bitmap.c boxes.c button.c @@ -24,6 +29,7 @@ set(sources single.c splash.c statusbar.c + sysinfo.c text.c timer.c tooltip.c @@ -32,66 +38,79 @@ set(sources window.c wpref.c writebitmap.c -# end of refactored sources gtkdraw-cairo.c - ) +) # help system is OS and build specific, add appropriate source files if(APPLE) if (XTRKCAD_USE_APPLEHELP) - set(sources - ${sources} + target_sources(xtrkcad-wlib + PRIVATE osxhelp.c) - else(XTRKCAD_USE_APPLEHELP) + else() 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) + target_sources(xtrkcad-wlib + PRIVATE + browserhelp.c) + else() + PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0" REQUIRED) + target_sources(xtrkcad-wlib + PRIVATE + ixhelp.c) + endif() + endif() +else() if(XTRKCAD_USE_BROWSER) - set(sources - ${sources} - browserhelp.c) - else(XTRKCAD_USE_BROWSER) + target_sources(xtrkcad-wlib + PRIVATE + browserhelp.c) + else() PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0" REQUIRED) - set(sources - ${sources} - ixhelp.c) - endif(XTRKCAD_USE_BROWSER) -endif(APPLE) - -include_directories(${XTrkCAD_BINARY_DIR}) - -add_library(xtrkcad-wlib ${headers} ${sources}) + target_sources(xtrkcad-wlib + PRIVATE + ixhelp.c) + endif() +endif() # GTK find_package (GTK2) -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}) + +target_include_directories(xtrkcad-wlib + PRIVATE + ${GTK_INCLUDE_DIRS} + ${GTK_UNIX_PRINT_INCLUDE_DIRS} +) +target_link_libraries(xtrkcad-wlib + PRIVATE + dynstring + ${GTK_UNIX_PRINT_LIBRARIES} + ${GTK_LIBRARIES} +) # add dependency to webkit if configured 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}) + target_include_directories(xtrkcad-wlib + ${GTK_WEBKIT_INCLUDE_DIRS} + ) + target_link_libraries(xtrkcad-wlib + PRIVATE + ${GTK_WEBKIT_LIBRARIES} + ) endif() endif() -else (APPLE) +else () if(NOT XTRKCAD_USE_BROWSER) - include_directories(${GTK_WEBKIT_INCLUDE_DIRS}) - target_link_libraries(xtrkcad-wlib ${GTK_WEBKIT_LIBRARIES}) + target_include_directories(xtrkcad-wlib + ${GTK_WEBKIT_INCLUDE_DIRS} + ) + target_link_libraries(xtrkcad-wlib + PRIVATE + ${GTK_WEBKIT_LIBRARIES} + ) endif() -endif(APPLE) +endif() |