From fb361e64e0a0049f82c6d6ecf1f65292367bc46d Mon Sep 17 00:00:00 2001 From: Kasper Peeters Date: Sat, 28 Sep 2024 20:53:21 +0100 Subject: [PATCH] Revert to imported target linking on Linux and macOS to avoid linking errors on macOS. --- frontend/gtkmm/CMakeLists.txt | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/frontend/gtkmm/CMakeLists.txt b/frontend/gtkmm/CMakeLists.txt index 32c144fc7d..4cc49923ee 100644 --- a/frontend/gtkmm/CMakeLists.txt +++ b/frontend/gtkmm/CMakeLists.txt @@ -186,15 +186,27 @@ target_link_libraries( ) if(USE_MICROTEX) - target_link_libraries( - cadabra2-gtk - PUBLIC - microtex-cairo # from MicroTeX - microtex # from MicroTeX - ${CairoMM_LIBRARIES} - ${PangoMM_LIBRARIES} - ${Fontconfig_LIBRARIES} - ) + if(WIN32) + target_link_libraries( + cadabra2-gtk + PUBLIC + microtex-cairo # from MicroTeX + microtex # from MicroTeX + ${CairoMM_LIBRARIES} + ${PangoMM_LIBRARIES} + ${Fontconfig_LIBRARIES} + ) + else() + target_link_libraries( + cadabra2-gtk + PUBLIC + microtex-cairo # from MicroTeX + microtex # from MicroTeX + PkgConfig::CairoMM + PkgConfig::PangoMM + PkgConfig::Fontconfig + ) + endif() endif()