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
932c92af
Commit
932c92af
authored
Feb 19, 2014
by
Marco Serantoni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MacOSX] New reorg for building system, typos and path refines
parent
bd52f006
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
44 additions
and
28 deletions
+44
-28
CMakeLists.txt
CMakeLists.txt
+19
-16
download_pcre.cmake
CMakeModules/download_pcre.cmake
+0
-6
mac-osx.txt
Documentation/compiling/mac-osx.txt
+2
-2
CMakeLists.txt
common/CMakeLists.txt
+9
-0
edaappl.cpp
common/edaappl.cpp
+2
-2
CMakeLists.txt
pcbnew/CMakeLists.txt
+2
-0
edit.cpp
pcbnew/edit.cpp
+1
-1
CMakeLists.txt
pcbnew/pcad2kicadpcb_plugin/CMakeLists.txt
+2
-0
CMakeLists.txt
pcbnew/router/CMakeLists.txt
+0
-1
CMakeLists.txt
polygon/CMakeLists.txt
+3
-0
CMakeLists.txt
utils/idftools/CMakeLists.txt
+4
-0
No files found.
CMakeLists.txt
View file @
932c92af
...
...
@@ -343,16 +343,17 @@ add_definitions(-DWX_COMPATIBILITY)
find_package
(
OpenGL QUIET
)
check_find_package_result
(
OPENGL_FOUND
"OpenGL"
)
# Handle target used to specify if a target needs wx-widgets or other libraries
# Always defined, empty if no libraries are to be build
add_custom_target
(
lib-dependencies
)
if
(
KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC
)
add_custom_target
(
lib-wxpython
)
# This should be build in all cases, if swig exec is not avaiable
# will be impossible also enable SCRIPTING being for PCBNEW required immediatly
include
(
download_pcre
)
include
(
download_swig
)
include
(
download_wxpython
)
add_dependencies
(
lib-wxpython pcre
)
add_dependencies
(
lib-wxpython swig
)
add_dependencies
(
lib-wxpython libwxpython
)
#set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib;.dll")
...
...
@@ -372,15 +373,11 @@ add_custom_target( lib-wxpython )
message
(
STATUS
"KICAD_BUILD_DYNAMIC set"
)
endif
()
add_custom_target
(
lib-dependencies
DEPENDS boost cairo glew libpng pixman pkgconfig
)
include
(
download_libpng
)
if
(
KICAD_SCRIPTING OR KICAD_SCRIPTING_WXPYTHON OR KICAD_SCRIPTING_MODULES
)
message
(
STATUS
"Scripting ENABLED"
)
include
(
download_wxpython
)
set
(
SWIG_EXECUTABLE
${
SWIG_ROOT
}
/bin/swig
)
set
(
SWIG_INCLUDE
${
SWIG_ROOT
}
/include
)
...
...
@@ -388,7 +385,7 @@ add_custom_target( lib-wxpython )
if
(
NOT EXISTS
${
SWIG_EXECUTABLE
}
)
set
(
KICAD_SCRIPTING CACHE OFF FORCE
"Disabling KICAD_SCRIPTING"
)
message
(
STATUS
"KICAD_SCRIPTING Enabled but SWIG not found, please disable and before reenabling execute: make
lib-wxpython
"
)
message
(
STATUS
"KICAD_SCRIPTING Enabled but SWIG not found, please disable and before reenabling execute: make
swig
"
)
message
(
FATAL_ERROR
"Missing SWIG!"
)
endif
()
message
(
STATUS
"SWIG_EXECUTABLE:
${
SWIG_EXECUTABLE
}
"
)
...
...
@@ -401,11 +398,15 @@ add_custom_target( lib-wxpython )
set
(
wxWidgets_LIBRARY_DIRS
${
LIBWXPYTHON_ROOT
}
/lib
)
add_dependencies
(
lib-dependencies libwxpython
)
add_dependencies
(
lib-dependencies swig
)
else
()
include
(
download_wxwidgets
)
add_dependencies
(
lib-dependencies libwx
)
endif
()
include
(
download_libpng
)
include
(
download_pkgconfig
)
set
(
PKG_CONFIG_EXECUTABLE
"
${
PKGCONFIG_ROOT
}
/bin/pkg-config"
)
include
(
download_glew
)
...
...
@@ -417,6 +418,12 @@ add_custom_target( lib-wxpython )
set
(
CAIRO_INCLUDE_DIR
"
${
CAIRO_ROOT
}
/include/cairo"
)
set
(
CAIRO_LIBRARY
"
${
CAIRO_ROOT
}
/lib/libcairo.a"
)
add_dependencies
(
lib-dependencies boost
)
add_dependencies
(
lib-dependencies cairo
)
add_dependencies
(
lib-dependencies libpng
)
add_dependencies
(
lib-dependencies pixman
)
add_dependencies
(
lib-dependencies pkgconfig
)
if
(
KICAD_BUILD_DYNAMIC AND APPLE
)
add_custom_target
(
osx_fix_bundles ALL DEPENDS cvpcb eeschema gerbview kicad pcbnew bitmap2component pcb_calculator pl_editor
)
add_custom_command
(
TARGET osx_fix_bundles POST_BUILD COMMAND scripts/osx_fixbundle.sh COMMENT
"Migrating dylibs to bundles"
)
...
...
@@ -623,17 +630,13 @@ if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
add_dependencies
(
pcbnew lib-dependencies
)
add_dependencies
(
eeschema lib-dependencies
)
add_dependencies
(
cvpcb lib-dependencies
)
add_dependencies
(
gal lib-dependencies
)
add_dependencies
(
common lib-dependencies
)
add_dependencies
(
gal lib-dependencies
)
add_dependencies
(
pcbcommon lib-dependencies
)
add_dependencies
(
3d-viewer lib-dependencies
)
add_dependencies
(
pcad2kicadpcb lib-dependencies
)
add_dependencies
(
polygon lib-dependencies
)
add_dependencies
(
pl_editor lib-dependencies
)
add_dependencies
(
pnsrouter lib-dependencies
)
if
(
BUILD_GITHUB_PLUGIN
)
add_dependencies
(
github_plugin lib-dependencies
)
endif
()
endif
()
if
(
KICAD_BUILD_DYNAMIC
)
...
...
CMakeModules/download_pcre.cmake
View file @
932c92af
...
...
@@ -27,8 +27,6 @@
set
(
PCRE_RELEASE 8.34
)
set
(
PCRE_MD5 eb34b2c9c727fd64940d6fd9a00995eb
)
# re-calc this on every RELEASE change
# The boost headers [and static libs if built] go here, at the top of KiCad
# source tree in boost_root.
set
(
PCRE_ROOT
"
${
PROJECT_SOURCE_DIR
}
/pcre_root"
)
#-----</configure>---------------------------------------------------------------
...
...
@@ -45,10 +43,6 @@ if (APPLE)
endif
(
CMAKE_OSX_ARCHITECTURES
)
endif
(
APPLE
)
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR>/boost and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add
(
pcre
PREFIX
"
${
PREFIX
}
"
DOWNLOAD_DIR
"
${
DOWNLOAD_DIR
}
"
...
...
Documentation/compiling/mac-osx.txt
View file @
932c92af
...
...
@@ -37,11 +37,11 @@ Building Kicad with support for Scripting
then issue for example
cmake -DKICAD_BUILD_DYNAMIC=ON .
make
lib-wxpython
make
swig
After successfully building you can set your KICAD_SCRIPTING* options (for example):
cmake -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_WXPYTHON=ON .
cmake -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SCRIPTING_MODULES=ON
.
make
The system will build all accordling your choices and package all in the bundle
...
...
common/CMakeLists.txt
View file @
932c92af
...
...
@@ -57,6 +57,10 @@ set( GAL_SRCS
add_library
(
gal STATIC
${
GAL_SRCS
}
)
add_dependencies
(
gal shader_headers
)
add_dependencies
(
gal lib-dependencies
)
add_dependencies
(
shader_headers lib-dependencies
)
# Only for win32 cross compilation using MXE
if
(
WIN32 AND MSYS
)
add_definitions
(
-DGLEW_STATIC
)
...
...
@@ -183,6 +187,7 @@ set( COMMON_SRCS
add_library
(
common STATIC
${
COMMON_SRCS
}
)
add_dependencies
(
common lib-dependencies
)
set
(
PCB_COMMON_SRCS
base_screen.cpp
...
...
@@ -249,6 +254,7 @@ set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES
)
add_library
(
pcbcommon STATIC
${
PCB_COMMON_SRCS
}
)
add_dependencies
(
pcbcommon lib-dependencies
)
# auto-generate specctra_lexer.h and specctra_keywords.cpp
make_lexer
(
...
...
@@ -315,3 +321,6 @@ make_lexer(
# 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
}
rt
)
add_dependencies
(
dsntest lib-dependencies
)
common/edaappl.cpp
View file @
932c92af
...
...
@@ -502,8 +502,8 @@ void EDA_APP::SetDefaultSearchPaths()
#ifdef __WXMSW__
tmp
.
AddEnvList
(
wxT
(
"PROGRAMFILES"
)
);
#elif __WXMAC__
tmp
.
Add
(
wxString
(
wxGetenv
(
wxT
(
"HOME"
)
)
)
+
wxT
(
"/Library/Application Support"
)
);
tmp
.
Add
(
wxT
(
"/Library/Application Support"
)
);
tmp
.
Add
(
wxString
(
wxGetenv
(
wxT
(
"HOME"
)
)
)
+
wxT
(
"/Library/Application Support
/kicad/
"
)
);
tmp
.
Add
(
wxT
(
"/Library/Application Support
/kicad/
"
)
);
#else
tmp
.
AddEnvList
(
wxT
(
"PATH"
)
);
#endif
...
...
pcbnew/CMakeLists.txt
View file @
932c92af
...
...
@@ -513,6 +513,7 @@ make_lexer(
add_subdirectory
(
pcad2kicadpcb_plugin
)
if
(
BUILD_GITHUB_PLUGIN
)
add_subdirectory
(
github
)
add_dependencies
(
github_plugin lib-dependencies
)
endif
()
...
...
@@ -526,6 +527,7 @@ add_executable( pcbnew WIN32 MACOSX_BUNDLE
${
PCBNEW_RESOURCES
}
)
add_dependencies
(
pcbnew lib-dependencies
)
###
# Set properties for APPLE on pcbnew target
###
...
...
pcbnew/edit.cpp
View file @
932c92af
...
...
@@ -1077,7 +1077,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
#ifndef USE_WX_OVERLAY
InstallGraphicItemPropertiesDialog
(
(
DRAWSEGMENT
*
)
GetCurItem
(),
&
dc
);
#else
// #12
6
7772 - Draw into dialog converted in refresh request
// #12
7
7772 - Draw into dialog converted in refresh request
InstallGraphicItemPropertiesDialog
(
(
DRAWSEGMENT
*
)
GetCurItem
(),
NULL
);
m_canvas
->
Refresh
();
#endif
...
...
pcbnew/pcad2kicadpcb_plugin/CMakeLists.txt
View file @
932c92af
...
...
@@ -29,3 +29,5 @@ set( PCAD2PCBNEW_SRCS
)
add_library
(
pcad2kicadpcb STATIC
${
PCAD2PCBNEW_SRCS
}
)
add_dependencies
(
pcad2kicadpcb lib-dependencies
)
pcbnew/router/CMakeLists.txt
View file @
932c92af
...
...
@@ -48,4 +48,3 @@ set( PCBNEW_PNS_SRCS
)
add_library
(
pnsrouter STATIC
${
PCBNEW_PNS_SRCS
}
)
polygon/CMakeLists.txt
View file @
932c92af
...
...
@@ -18,3 +18,6 @@ set(POLYGON_SRCS
)
add_library
(
polygon STATIC
${
POLYGON_SRCS
}
)
add_dependencies
(
polygon lib-dependencies
)
utils/idftools/CMakeLists.txt
View file @
932c92af
...
...
@@ -18,6 +18,10 @@ add_executable( dxf2idf dxf2idfmain.cpp dxf2idf.cpp
"
${
CMAKE_SOURCE_DIR
}
/common/richio.cpp"
)
add_dependencies
(
idfcyl lib-dependencies
)
add_dependencies
(
idfrect lib-dependencies
)
add_dependencies
(
dxf2idf lib-dependencies
)
target_link_libraries
(
dxf2idf lib_dxf
${
wxWidgets_LIBRARIES
}
)
install
(
TARGETS idfcyl idfrect dxf2idf
...
...
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