From d400a25075a959723d5a5d084e5808ea5aacf766 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 9 Apr 2013 16:12:18 +0200 Subject: [PATCH] Modified CMakeLists.txt in order to compile Kicad with KICAD_GAL=ON for Windows Added settings that allow to use M cross environment (http://mxe.cc) to crosscompile Kicad for Windows. --- common/CMakeLists.txt | 4 ++++ cvpcb/CMakeLists.txt | 16 ++++++++++++++-- pcbnew/CMakeLists.txt | 16 ++++++++++++++-- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 8c320220bd..77904ee9ee 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -25,6 +25,10 @@ set(GAL_SRCS ) add_library(gal STATIC ${GAL_SRCS}) + +if(WIN32) +add_definitions(-DGLEW_STATIC) +endif(WIN32) endif(KICAD_GAL) set(COMMON_ABOUT_DLG_SRCS diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index c7922c58d6..2851747337 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -106,9 +106,21 @@ target_link_libraries(cvpcb if(KICAD_GAL) target_link_libraries(cvpcb - gal - ${GLEW_LIBRARIES} + gal + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} ) + +if(WIN32) +target_link_libraries(cvpcb + opengl32 + glu32 + pixman-1 + fontconfig + freetype + bz2 + ) +endif(WIN32) endif(KICAD_GAL) ### diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d65bd84a56..3d2226f6e6 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -428,9 +428,21 @@ target_link_libraries(pcbnew if(KICAD_GAL) target_link_libraries(pcbnew - gal - ${GLEW_LIBRARIES} + gal + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} ) + +if(WIN32) +target_link_libraries(pcbnew + opengl32 + glu32 + pixman-1 + fontconfig + freetype + bz2 + ) +endif(WIN32) endif(KICAD_GAL) ###