diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a96865045..92ee77094f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -768,11 +768,6 @@ find_package( Fontconfig REQUIRED ) # Include MinGW resource compiler. include( MinGWResourceCompiler ) -if( WIN32 ) - # we need the gdiplus library for cairo printing on windows - set( GDI_PLUS_LIBRARIES gdiplus ) -endif() - # Find ngspice library, required for integrated circuit simulator if( KICAD_SPICE ) find_package( ngspice REQUIRED ) diff --git a/common/gal/CMakeLists.txt b/common/gal/CMakeLists.txt index 7c91c57292..1e37c09b50 100644 --- a/common/gal/CMakeLists.txt +++ b/common/gal/CMakeLists.txt @@ -44,6 +44,11 @@ set( GAL_SRCS add_library( gal STATIC ${GAL_SRCS} ) +if( WIN32 ) + # we need the gdiplus library for cairo printing on windows + set( GDI_PLUS_LIBRARIES gdiplus ) +endif() + target_link_libraries( gal common # This is needed until the circular dependency is removed kimath diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 4144b084e6..994eed208b 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -76,7 +76,6 @@ target_link_libraries( cvpcb_kiface kimath ${PCBNEW_IO_LIBRARIES} ${wxWidgets_LIBRARIES} - ${GDI_PLUS_LIBRARIES} ) # Must follow github_plugin @@ -85,7 +84,7 @@ target_link_libraries( cvpcb_kiface ${Boost_LIBRARIES} ) target_include_directories( cvpcb_kiface PRIVATE $ ) - + if( UNIX AND NOT APPLE ) # -lrt must follow Boost target_link_libraries( cvpcb_kiface rt ) diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index c3ed694809..5f64d349a2 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -468,7 +468,6 @@ target_link_libraries( eeschema_kiface scripting sexpr ${wxWidgets_LIBRARIES} - ${GDI_PLUS_LIBRARIES} ) if( KICAD_SPICE ) diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 727ec98f00..1e0e26baa6 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -156,7 +156,6 @@ target_link_libraries( gerbview_kiface gal common ${wxWidgets_LIBRARIES} - ${GDI_PLUS_LIBRARIES} ) set_source_files_properties( gerbview.cpp PROPERTIES # The KIFACE is in gerbview.cpp, export it: diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 56d348ea6d..055fd6d1fb 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -87,7 +87,6 @@ else() gal common #repeated due to a circular dependency between gal and common ${wxWidgets_LIBRARIES} - ${GDI_PLUS_LIBRARIES} ) endif() diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index eea62a97c3..b8b99ad371 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -109,7 +109,6 @@ target_link_libraries( pl_editor_kiface gal common ${wxWidgets_LIBRARIES} - ${GDI_PLUS_LIBRARIES} ) set_target_properties( pl_editor_kiface PROPERTIES OUTPUT_NAME pl_editor diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 79cee6fbb3..a01eb5e9e1 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -719,7 +719,6 @@ set( PCBNEW_KIFACE_LIBRARIES markdown_lib ${PCBNEW_IO_LIBRARIES} ${wxWidgets_LIBRARIES} - ${GDI_PLUS_LIBRARIES} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES} ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost diff --git a/qa/pcbnew_utils/CMakeLists.txt b/qa/pcbnew_utils/CMakeLists.txt index 9d5ecf3443..b0a68d9f6a 100644 --- a/qa/pcbnew_utils/CMakeLists.txt +++ b/qa/pcbnew_utils/CMakeLists.txt @@ -74,7 +74,6 @@ target_link_libraries( qa_pcbnew_utils PUBLIC # unit_test_utils # ${PCBNEW_IO_LIBRARIES} # ${wxWidgets_LIBRARIES} -# ${GDI_PLUS_LIBRARIES} # ${PYTHON_LIBRARIES} # ${Boost_LIBRARIES} # must follow GITHUB # ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost