Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
465dabd9
Commit
465dabd9
authored
Jul 16, 2012
by
Miguel Angel Ajo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes Win32 compilation that my previous commit broke, thanks to JP
parent
829e952e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
29 deletions
+49
-29
CMakeLists.txt
CMakeLists.txt
+19
-8
CMakeLists.txt
pcbnew/CMakeLists.txt
+25
-19
dialog_footprint_wizard_list.cpp
pcbnew/dialogs/dialog_footprint_wizard_list.cpp
+2
-2
footprint_wizard.cpp
pcbnew/footprint_wizard.cpp
+3
-0
No files found.
CMakeLists.txt
View file @
465dabd9
...
@@ -91,14 +91,25 @@ endif(KICAD_STABLE_VERSION )
...
@@ -91,14 +91,25 @@ endif(KICAD_STABLE_VERSION )
#================================================
#================================================
if
(
CMAKE_COMPILER_IS_GNUCXX
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
# Set default flags for Release build.
if
(
WIN32
)
# under Windows/mingw, -fPIC option is enabled by default
set
(
CMAKE_C_FLAGS_RELEASE
"-Wall -O2 -DNDEBUG -fPIC"
)
# Set default flags for Release build.
set
(
CMAKE_CXX_FLAGS_RELEASE
"-Wall -O2 -DNDEBUG -fPIC"
)
set
(
CMAKE_C_FLAGS_RELEASE
"-Wall -O2 -DNDEBUG"
)
set
(
CMAKE_EXE_LINKER_FLAGS_RELEASE
"-s"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-Wall -O2 -DNDEBUG"
)
set
(
CMAKE_EXE_LINKER_FLAGS_RELEASE
"-s"
)
# Set default flags for Debug build.
set
(
CMAKE_C_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG -fPIC"
)
# Set default flags for Debug build.
set
(
CMAKE_CXX_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG -fPIC"
)
set
(
CMAKE_C_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG"
)
else
(
WIN32
)
# Set default flags for Release build.
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 -fPIC"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG -fPIC"
)
endif
(
WIN32
)
endif
(
CMAKE_COMPILER_IS_GNUCXX
)
endif
(
CMAKE_COMPILER_IS_GNUCXX
)
...
...
pcbnew/CMakeLists.txt
View file @
465dabd9
...
@@ -5,10 +5,10 @@ if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
...
@@ -5,10 +5,10 @@ if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
SET
(
PYTHON_DEST
"lib/python
${
PYTHON_VERSION
}
/dist-packages"
)
SET
(
PYTHON_DEST
"lib/python
${
PYTHON_VERSION
}
/dist-packages"
)
file
(
MAKE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/scripting
)
file
(
MAKE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/scripting
)
FIND_PACKAGE
(
SWIG REQUIRED
)
FIND_PACKAGE
(
SWIG REQUIRED
)
INCLUDE
(
${
SWIG_USE_FILE
}
)
INCLUDE
(
${
SWIG_USE_FILE
}
)
FIND_PACKAGE
(
PythonLibs
)
FIND_PACKAGE
(
PythonLibs
)
INCLUDE_DIRECTORIES
(
${
PYTHON_INCLUDE_PATH
}
)
INCLUDE_DIRECTORIES
(
${
PYTHON_INCLUDE_PATH
}
)
add_definitions
(
-DPCBNEW -DKICAD_SCRIPTING
)
add_definitions
(
-DPCBNEW -DKICAD_SCRIPTING
)
endif
()
endif
()
###
###
...
@@ -246,7 +246,7 @@ set(PCBNEW_SCRIPTING_DIALOGS
...
@@ -246,7 +246,7 @@ set(PCBNEW_SCRIPTING_DIALOGS
)
)
set
(
PCBNEW_SCRIPTING_PYTHON_HELPERS
set
(
PCBNEW_SCRIPTING_PYTHON_HELPERS
../scripting/wx_python_helpers.cpp
../scripting/wx_python_helpers.cpp
../scripting/python_scripting.cpp
../scripting/python_scripting.cpp
scripting/pcbnew_scripting_helpers.cpp
scripting/pcbnew_scripting_helpers.cpp
...
@@ -268,16 +268,16 @@ endif()
...
@@ -268,16 +268,16 @@ endif()
if
(
KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES
)
if
(
KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES
)
set
(
SWIG_FLAGS -I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../.. -I
${
CMAKE_CURRENT_SOURCE_DIR
}
-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../include -I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../scripting
)
set
(
SWIG_FLAGS -I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../.. -I
${
CMAKE_CURRENT_SOURCE_DIR
}
-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../include -I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../scripting
)
if
(
DEBUG
)
if
(
DEBUG
)
set
(
SWIG_FLAGS
${
SWIG_FLAGS
}
-DDEBUG
)
set
(
SWIG_FLAGS
${
SWIG_FLAGS
}
-DDEBUG
)
endif
()
endif
()
# collect CFLAGS , and pass them to swig later
# collect CFLAGS , and pass them to swig later
get_directory_property
(
DirDefs DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMPILE_DEFINITIONS
)
get_directory_property
(
DirDefs DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMPILE_DEFINITIONS
)
foreach
(
d
${
DirDefs
}
)
foreach
(
d
${
DirDefs
}
)
SET
(
SWIG_FLAGS
${
SWIG_FLAGS
}
-D
${
d
}
)
SET
(
SWIG_FLAGS
${
SWIG_FLAGS
}
-D
${
d
}
)
endforeach
()
endforeach
()
# check if we have IO_MGR and KICAD_PLUGIN available
# check if we have IO_MGR and KICAD_PLUGIN available
if
(
USE_NEW_PCBNEW_LOAD OR USE_NEW_PCBNEW_SAVE
)
if
(
USE_NEW_PCBNEW_LOAD OR USE_NEW_PCBNEW_SAVE
)
SET
(
SWIG_FLAGS
${
SWIG_FLAGS
}
-DBUILD_WITH_PLUGIN
)
SET
(
SWIG_FLAGS
${
SWIG_FLAGS
}
-DBUILD_WITH_PLUGIN
)
...
@@ -287,11 +287,11 @@ if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
...
@@ -287,11 +287,11 @@ if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
endif
()
endif
()
endif
()
endif
()
if
(
KICAD_SCRIPTING
)
if
(
KICAD_SCRIPTING
)
SET
(
SWIG_OPTS -python -c++ -outdir
${
CMAKE_CURRENT_BINARY_DIR
}
${
SWIG_FLAGS
}
)
SET
(
SWIG_OPTS -python -c++ -outdir
${
CMAKE_CURRENT_BINARY_DIR
}
${
SWIG_FLAGS
}
)
add_custom_command
(
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew_wrap.cxx
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew_wrap.cxx
DEPENDS scripting/pcbnew.i
DEPENDS scripting/pcbnew.i
...
@@ -304,13 +304,13 @@ if (KICAD_SCRIPTING)
...
@@ -304,13 +304,13 @@ if (KICAD_SCRIPTING)
DEPENDS ../scripting/kicad.i
DEPENDS ../scripting/kicad.i
DEPENDS ../scripting/wx.i
DEPENDS ../scripting/wx.i
DEPENDS ../scripting/kicadplugins.i
DEPENDS ../scripting/kicadplugins.i
COMMAND
${
SWIG_EXECUTABLE
}
${
SWIG_OPTS
}
-o
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew_wrap.cxx scripting/pcbnew.i
COMMAND
${
SWIG_EXECUTABLE
}
${
SWIG_OPTS
}
-o
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew_wrap.cxx scripting/pcbnew.i
COMMAND
${
CMAKE_CURRENT_SOURCE_DIR
}
/../scripting/fixswigimports.py
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew.py
COMMAND
${
CMAKE_CURRENT_SOURCE_DIR
}
/../scripting/fixswigimports.py
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew.py
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
)
endif
(
KICAD_SCRIPTING
)
endif
(
KICAD_SCRIPTING
)
...
@@ -323,7 +323,7 @@ if (KICAD_SCRIPTING_MODULES)
...
@@ -323,7 +323,7 @@ if (KICAD_SCRIPTING_MODULES)
SET
(
CMAKE_SWIG_FLAGS
${
SWIG_FLAGS
}
)
SET
(
CMAKE_SWIG_FLAGS
${
SWIG_FLAGS
}
)
SET_SOURCE_FILES_PROPERTIES
(
scripting/pcbnew.i PROPERTIES CPLUSPLUS ON
)
SET_SOURCE_FILES_PROPERTIES
(
scripting/pcbnew.i PROPERTIES CPLUSPLUS ON
)
SWIG_ADD_MODULE
(
pcbnew python scripting/pcbnew.i
${
PCBNEW_SCRIPTING_PYTHON_HELPERS
}
${
PCBNEW_SRCS
}
${
PCBNEW_COMMON_SRCS
}
)
SWIG_ADD_MODULE
(
pcbnew python scripting/pcbnew.i
${
PCBNEW_SCRIPTING_PYTHON_HELPERS
}
${
PCBNEW_SRCS
}
${
PCBNEW_COMMON_SRCS
}
)
SWIG_LINK_LIBRARIES
(
pcbnew
SWIG_LINK_LIBRARIES
(
pcbnew
3d-viewer
3d-viewer
pcbcommon
pcbcommon
common
common
...
@@ -334,9 +334,14 @@ if (KICAD_SCRIPTING_MODULES)
...
@@ -334,9 +334,14 @@ if (KICAD_SCRIPTING_MODULES)
${
OPENGL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
GDI_PLUS_LIBRARIES
}
${
GDI_PLUS_LIBRARIES
}
${
PYTHON_LIBRARIES
}
)
${
PYTHON_LIBRARIES
}
)
endif
(
KICAD_SCRIPTING_MODULES
)
endif
(
KICAD_SCRIPTING_MODULES
)
if
(
KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES
)
set
(
PCBNEW_EXTRA_LIBS
"rt"
)
endif
(
KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES
)
###
###
# Windows resource file
# Windows resource file
###
###
...
@@ -410,6 +415,7 @@ endif(APPLE)
...
@@ -410,6 +415,7 @@ endif(APPLE)
###
###
# Link executable target pcbnew with correct libraries
# Link executable target pcbnew with correct libraries
###
###
target_link_libraries
(
pcbnew
target_link_libraries
(
pcbnew
3d-viewer
3d-viewer
pcbcommon
pcbcommon
...
@@ -421,7 +427,7 @@ target_link_libraries(pcbnew
...
@@ -421,7 +427,7 @@ target_link_libraries(pcbnew
${
OPENGL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
GDI_PLUS_LIBRARIES
}
${
GDI_PLUS_LIBRARIES
}
${
PYTHON_LIBRARIES
}
${
PYTHON_LIBRARIES
}
rt
${
PCBNEW_EXTRA_LIBS
}
)
)
###
###
...
@@ -435,7 +441,7 @@ if(KICAD_SCRIPTING)
...
@@ -435,7 +441,7 @@ if(KICAD_SCRIPTING)
add_custom_target
(
FixSwigImportsScripting ALL
add_custom_target
(
FixSwigImportsScripting ALL
${
CMAKE_CURRENT_SOURCE_DIR
}
/../scripting/fixswigimports.py
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew.py
${
CMAKE_CURRENT_SOURCE_DIR
}
/../scripting/fixswigimports.py
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew.py
DEPENDS
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew
DEPENDS
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew
COMMENT
"Fixing swig_import_helper"
COMMENT
"Fixing swig_import_helper"
)
)
...
@@ -447,13 +453,13 @@ if (KICAD_SCRIPTING_MODULES)
...
@@ -447,13 +453,13 @@ if (KICAD_SCRIPTING_MODULES)
add_custom_target
(
FixSwigImportsModuleScripting ALL
add_custom_target
(
FixSwigImportsModuleScripting ALL
${
CMAKE_CURRENT_SOURCE_DIR
}
/../scripting/fixswigimports.py
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew.py
${
CMAKE_CURRENT_SOURCE_DIR
}
/../scripting/fixswigimports.py
${
CMAKE_CURRENT_BINARY_DIR
}
/pcbnew.py
DEPENDS
${
CMAKE_CURRENT_BINARY_DIR
}
/_pcbnew
DEPENDS
${
CMAKE_CURRENT_BINARY_DIR
}
/_pcbnew
COMMENT
"Fixing swig_import_helper"
COMMENT
"Fixing swig_import_helper"
)
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/pcbnew/pcbnew.py
install
(
FILES
${
CMAKE_BINARY_DIR
}
/pcbnew/pcbnew.py
DESTINATION
${
PYTHON_DEST
}
)
DESTINATION
${
PYTHON_DEST
}
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/pcbnew/_pcbnew.so
install
(
FILES
${
CMAKE_BINARY_DIR
}
/pcbnew/_pcbnew.so
DESTINATION
${
PYTHON_DEST
}
)
DESTINATION
${
PYTHON_DEST
}
)
endif
(
KICAD_SCRIPTING_MODULES
)
endif
(
KICAD_SCRIPTING_MODULES
)
...
@@ -463,12 +469,12 @@ endif(KICAD_SCRIPTING_MODULES)
...
@@ -463,12 +469,12 @@ endif(KICAD_SCRIPTING_MODULES)
if
(
NOT MSVC
)
if
(
NOT MSVC
)
# This one gets made only when testing.
# This one gets made only when testing.
add_executable
(
specctra_test EXCLUDE_FROM_ALL specctra_test.cpp specctra.cpp
)
add_executable
(
specctra_test EXCLUDE_FROM_ALL specctra_test.cpp specctra.cpp
)
target_link_libraries
(
specctra_test common
${
wxWidgets_LIBRARIES
}
rt
)
target_link_libraries
(
specctra_test common
${
wxWidgets_LIBRARIES
}
)
endif
(
NOT MSVC
)
endif
(
NOT MSVC
)
# This one gets made only when testing.
# This one gets made only when testing.
add_executable
(
layer_widget_test WIN32 EXCLUDE_FROM_ALL
add_executable
(
layer_widget_test WIN32 EXCLUDE_FROM_ALL
layer_widget.cpp
layer_widget.cpp
)
)
target_link_libraries
(
layer_widget_test common
${
wxWidgets_LIBRARIES
}
rt
)
target_link_libraries
(
layer_widget_test common
${
wxWidgets_LIBRARIES
}
)
pcbnew/dialogs/dialog_footprint_wizard_list.cpp
View file @
465dabd9
/**
/**
* @file dialog_
scripting
.cpp
* @file dialog_
footprint_wizard_list
.cpp
*/
*/
#include <wx
-2.8/wx/generic
/grid.h>
#include <wx/grid.h>
...
...
pcbnew/footprint_wizard.cpp
View file @
465dabd9
...
@@ -87,6 +87,9 @@ void FOOTPRINT_WIZARD_FRAME::DisplayWizardInfos()
...
@@ -87,6 +87,9 @@ void FOOTPRINT_WIZARD_FRAME::DisplayWizardInfos()
void
FOOTPRINT_WIZARD_FRAME
::
ReloadFootprint
()
void
FOOTPRINT_WIZARD_FRAME
::
ReloadFootprint
()
{
{
if
(
m_FootprintWizard
==
NULL
)
return
;
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
// Delete the current footprint
// Delete the current footprint
GetBoard
()
->
m_Modules
.
DeleteAll
();
GetBoard
()
->
m_Modules
.
DeleteAll
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment