From 1b7593f4030c946e31b8fbf30e23cb2a88d639e3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sat, 10 Aug 2013 11:14:16 +0200 Subject: [PATCH] Fixed win32 builds. --- common/CMakeLists.txt | 6 ++++-- cvpcb/CMakeLists.txt | 14 ++++++-------- pcbnew/CMakeLists.txt | 12 +++++------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 837ce50e81..40223de25d 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -5,6 +5,7 @@ include_directories( ./dialog_about ${Boost_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} + ${GLEW_INCLUDE_DIR} ../3d-viewer ../pcbnew ../polygon @@ -56,9 +57,10 @@ set(GAL_SRCS add_library(gal STATIC ${GAL_SRCS}) add_dependencies(gal shader_headers) -if(WIN32) +# Only for win32 cross compilation using MXE +if(WIN32 AND MSYS) add_definitions(-DGLEW_STATIC) -endif(WIN32) +endif(WIN32 AND MSYS) set(COMMON_ABOUT_DLG_SRCS dialog_about/AboutDialog_main.cpp diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 5310be69a3..247ab3c1ad 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -94,18 +94,16 @@ target_link_libraries(cvpcb common bitmaps polygon + gal ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${GDI_PLUS_LIBRARIES} + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} ) -target_link_libraries(cvpcb - gal - ${GLEW_LIBRARIES} - ${CAIRO_LIBRARIES} - ) - -if(WIN32) +# Only for win32 cross compilation using MXE +if(WIN32 AND MSYS) target_link_libraries(cvpcb opengl32 glu32 @@ -114,7 +112,7 @@ target_link_libraries(cvpcb freetype bz2 ) -endif(WIN32) +endif(WIN32 AND MSYS) ### # Add cvpcb as install target diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d01a1d579a..06a0050f3a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -420,20 +420,18 @@ target_link_libraries(pcbnew pcad2kicadpcb polygon bitmaps + gal ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${GDI_PLUS_LIBRARIES} ${PYTHON_LIBRARIES} ${PCBNEW_EXTRA_LIBS} - ) - -target_link_libraries(pcbnew - gal ${GLEW_LIBRARIES} ${CAIRO_LIBRARIES} ) - -if(WIN32) + +# Only for win32 cross compilation using MXE +if(WIN32 AND MSYS) target_link_libraries(pcbnew opengl32 glu32 @@ -442,7 +440,7 @@ target_link_libraries(pcbnew freetype bz2 ) -endif(WIN32) +endif(WIN32 AND MSYS) ### # Add pcbnew as install target