diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-02-09 19:41:45 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-02-09 19:41:45 +0100 |
| commit | 809ceea075d0636263de2db7e35735555c151d67 (patch) | |
| tree | c3911041decfb7bfc117e7ed6a14aa4afe2a9e8a | |
| parent | ede53b8a50af185c5c421ae73e055ca20930d43f (diff) | |
Fix Cairo related build issues (missing Cairo lib)
... particularly for shared libs
| -rw-r--r-- | CMake/fl_add_library.cmake | 1 | ||||
| -rw-r--r-- | test/CMakeLists.txt | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/CMake/fl_add_library.cmake b/CMake/fl_add_library.cmake index 150125a0f..fe1671f93 100644 --- a/CMake/fl_add_library.cmake +++ b/CMake/fl_add_library.cmake @@ -161,6 +161,7 @@ function(fl_add_library LIBNAME LIBTYPE SOURCES) if(FLTK_HAVE_CAIRO OR FLTK_USE_CAIRO) target_include_directories(${TARGET_NAME} PUBLIC ${PKG_CAIRO_INCLUDE_DIRS}) target_link_directories(${TARGET_NAME} PUBLIC ${PKG_CAIRO_LIBRARY_DIRS}) + target_link_libraries(${TARGET_NAME} PUBLIC ${PKG_CAIRO_LIBRARIES}) endif() endif(LIBNAME STREQUAL "fltk") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 53e9fad7e..a59679faf 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -275,7 +275,11 @@ if(FLTK_BUILD_SHARED_LIBS) fl_create_example(shape-shared shape.cxx "${GLDEMO_SHARED}") endif(OPENGL_FOUND) - fl_create_example(cairo_test-shared cairo_test.cxx "fltk::fltk-shared;cairo") + if(FLTK_HAVE_CAIRO) + fl_create_example(cairo_test-shared cairo_test.cxx "fltk::fltk-shared;cairo") + else() + fl_create_example(cairo_test-shared cairo_test.cxx "fltk::fltk-shared") + endif() endif(MSVC) # (not MSVC) |
