From 3fcbc847a9b86b8bfdaaf1d46a0820e6a07592a5 Mon Sep 17 00:00:00 2001 From: Miguel Angel Ajo Date: Mon, 9 Apr 2012 08:53:24 +0200 Subject: [PATCH] lajos kamocsay compilation patches --- CMakeLists.txt | 8 ++++---- common/CMakeLists.txt | 2 +- include/boost/polygon/polygon.hpp | 2 ++ pcbnew/CMakeLists.txt | 7 ++++--- pcbnew/dialogs/dialog_scripting.cpp | 2 +- scripting/fixswigimports.py | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a1eea87d7d..e4f5ebc683 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,13 +86,13 @@ endif(KICAD_STABLE_VERSION ) if(CMAKE_COMPILER_IS_GNUCXX) # Set default flags for Release build. - set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG ") - set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG") + set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG -fPIC") + set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG -fPIC") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s") # Set default flags for Debug build. - set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") - set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") + set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG -fPIC") + set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG -fPIC") if( USE_PNG_BITMAPS ) #Add -DUSE_PNG_BITMAPS to windres.exe command line diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 3749bc051d..9acdfecb82 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -150,6 +150,6 @@ if(NOT MSVC) # This one gets made only when testing. # to build it, first enable #define STAND_ALONE at top of dsnlexer.cpp add_executable( dsntest EXCLUDE_FROM_ALL dsnlexer.cpp ) - target_link_libraries( dsntest common ${wxWidgets_LIBRARIES} ) + target_link_libraries( dsntest common ${wxWidgets_LIBRARIES} rt ) endif( NOT MSVC ) diff --git a/include/boost/polygon/polygon.hpp b/include/boost/polygon/polygon.hpp index 10104565da..9dc936844c 100644 --- a/include/boost/polygon/polygon.hpp +++ b/include/boost/polygon/polygon.hpp @@ -24,6 +24,8 @@ #include "transform.hpp" #include "detail/transform_detail.hpp" +#include "detail/polygon_sort_adaptor.hpp" + //interval #include "interval_data.hpp" #include "interval_traits.hpp" diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index cf36bf6a83..0c7d12d64e 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -1,7 +1,7 @@ add_definitions(-DPCBNEW) if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) - EXECUTE_PROCESS(COMMAND python -c "import sys;print\"%s.%s\"%sys.version_info[0:2]" OUTPUT_VARIABLE PYTHON_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + EXECUTE_PROCESS(COMMAND python2 -c "import sys;print\"%s.%s\"%sys.version_info[0:2]" OUTPUT_VARIABLE PYTHON_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) SET(PYTHON_DEST "lib/python${PYTHON_VERSION}/dist-packages" ) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting) @@ -392,6 +392,7 @@ target_link_libraries(pcbnew ${OPENGL_LIBRARIES} ${GDI_PLUS_LIBRARIES} ${PYTHON_LIBRARIES} + rt ) ### @@ -433,12 +434,12 @@ endif(KICAD_SCRIPTING_MODULES) if(NOT MSVC) # This one gets made only when testing. add_executable(specctra_test EXCLUDE_FROM_ALL specctra_test.cpp specctra.cpp) - target_link_libraries(specctra_test common ${wxWidgets_LIBRARIES}) + target_link_libraries(specctra_test common ${wxWidgets_LIBRARIES} rt) endif(NOT MSVC) # This one gets made only when testing. add_executable(layer_widget_test WIN32 EXCLUDE_FROM_ALL layer_widget.cpp ) -target_link_libraries(layer_widget_test common ${wxWidgets_LIBRARIES}) +target_link_libraries(layer_widget_test common ${wxWidgets_LIBRARIES} rt) diff --git a/pcbnew/dialogs/dialog_scripting.cpp b/pcbnew/dialogs/dialog_scripting.cpp index 6bc9822cab..7b20997a58 100644 --- a/pcbnew/dialogs/dialog_scripting.cpp +++ b/pcbnew/dialogs/dialog_scripting.cpp @@ -3,12 +3,12 @@ */ +#include #include #include #include #include #include -#include DIALOG_SCRIPTING::DIALOG_SCRIPTING( wxWindow* parent ) diff --git a/scripting/fixswigimports.py b/scripting/fixswigimports.py index bb338c1e4c..add960fa81 100755 --- a/scripting/fixswigimports.py +++ b/scripting/fixswigimports.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # the purpose of this script is rewriting the swig_import_helper # call so it will not load _xxxxx.so/dso from inside a kicad executable