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
786bb81c
Commit
786bb81c
authored
Jan 27, 2014
by
Marco Serantoni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MacOSX] KICAD_BUILD_DYNAMIC stabilized and almost working
parent
6181e9e4
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
102 additions
and
10 deletions
+102
-10
CMakeLists.txt
CMakeLists.txt
+13
-0
download_cairo.cmake
CMakeModules/download_cairo.cmake
+1
-0
download_glew.cmake
CMakeModules/download_glew.cmake
+16
-1
download_libpng.cmake
CMakeModules/download_libpng.cmake
+1
-0
download_pixman.cmake
CMakeModules/download_pixman.cmake
+2
-0
download_pkgconfig.cmake
CMakeModules/download_pkgconfig.cmake
+5
-7
download_wxwidgets.cmake
CMakeModules/download_wxwidgets.cmake
+4
-2
wxwidgets-3.0.0_macosx_bug_15908.patch
patches/wxwidgets-3.0.0_macosx_bug_15908.patch
+14
-0
osx_fixbundle.sh
scripts/osx_fixbundle.sh
+46
-0
No files found.
CMakeLists.txt
View file @
786bb81c
...
@@ -182,6 +182,9 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
...
@@ -182,6 +182,9 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-D__ASSERTMACROS__ -mmacosx-version-min=10.5"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-D__ASSERTMACROS__ -mmacosx-version-min=10.5"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-D__ASSERTMACROS__ -mmacosx-version-min=10.5"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-D__ASSERTMACROS__ -mmacosx-version-min=10.5"
)
# Allows .dylib relocation in the future
set
(
CMAKE_LD_FLAGS
"
${
CMAKE_LD_FLAGS
}
-headerpad_max_install_names"
)
if
(
NOT CMAKE_CXX_COMPILER
)
if
(
NOT CMAKE_CXX_COMPILER
)
EXEC_PROGRAM
(
wx-config ARGS --cc OUTPUT_VARIABLE CMAKE_C_COMPILER
)
EXEC_PROGRAM
(
wx-config ARGS --cc OUTPUT_VARIABLE CMAKE_C_COMPILER
)
endif
(
NOT CMAKE_CXX_COMPILER
)
endif
(
NOT CMAKE_CXX_COMPILER
)
...
@@ -332,6 +335,11 @@ if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
...
@@ -332,6 +335,11 @@ if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
set
(
CAIRO_INCLUDE_DIR
"
${
CAIRO_ROOT
}
/include/cairo"
)
set
(
CAIRO_INCLUDE_DIR
"
${
CAIRO_ROOT
}
/include/cairo"
)
set
(
CAIRO_LIBRARY
"
${
CAIRO_ROOT
}
/lib/libcairo.a"
)
set
(
CAIRO_LIBRARY
"
${
CAIRO_ROOT
}
/lib/libcairo.a"
)
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"
)
endif
()
endif
(
KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC
)
endif
(
KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC
)
...
@@ -525,8 +533,13 @@ add_dependencies( pcad2kicadpcb lib-dependencies )
...
@@ -525,8 +533,13 @@ add_dependencies( pcad2kicadpcb lib-dependencies )
add_dependencies
(
polygon lib-dependencies
)
add_dependencies
(
polygon lib-dependencies
)
add_dependencies
(
pl_editor lib-dependencies
)
add_dependencies
(
pl_editor lib-dependencies
)
add_dependencies
(
pnsrouter lib-dependencies
)
add_dependencies
(
pnsrouter lib-dependencies
)
if
(
BUILD_GITHUB_PLUGIN
)
add_dependencies
(
github_plugin lib-dependencies
)
endif
()
endif
()
endif
()
if
(
KICAD_BUILD_DYNAMIC
)
endif
()
#############
#############
# Resources #
# Resources #
...
...
CMakeModules/download_cairo.cmake
View file @
786bb81c
...
@@ -81,6 +81,7 @@ ExternalProject_Add( cairo
...
@@ -81,6 +81,7 @@ ExternalProject_Add( cairo
BUILD_IN_SOURCE 1
BUILD_IN_SOURCE 1
#SOURCE_DIR "${PREFIX}"
#SOURCE_DIR "${PREFIX}"
#PATCH_COMMAND ""
#PATCH_COMMAND ""
UPDATE_COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
"
${
CAIRO_ROOT
}
"
CONFIGURE_COMMAND ./configure --prefix=
${
CAIRO_ROOT
}
--enable-static
${
CAIRO_BUILDTYPE
}
CONFIGURE_COMMAND ./configure --prefix=
${
CAIRO_ROOT
}
--enable-static
${
CAIRO_BUILDTYPE
}
PKG_CONFIG=
${
PROJECT_SOURCE_DIR
}
/pkgconfig_root/bin/pkg-config
PKG_CONFIG=
${
PROJECT_SOURCE_DIR
}
/pkgconfig_root/bin/pkg-config
...
...
CMakeModules/download_glew.cmake
View file @
786bb81c
...
@@ -60,6 +60,8 @@ ExternalProject_Add( glew
...
@@ -60,6 +60,8 @@ ExternalProject_Add( glew
#SOURCE_DIR "${PREFIX}"
#SOURCE_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
BUILD_IN_SOURCE 1
UPDATE_COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
"
${
GLEW_ROOT
}
"
#PATCH_COMMAND "true"
#PATCH_COMMAND "true"
CONFIGURE_COMMAND
""
CONFIGURE_COMMAND
""
...
@@ -68,5 +70,18 @@ ExternalProject_Add( glew
...
@@ -68,5 +70,18 @@ ExternalProject_Add( glew
BUILD_COMMAND $
(
MAKE
)
${
GLEW_CFLAGS
}
${
GLEW_LDFLAGS
}
${
GLEW_STRIP
}
BUILD_COMMAND $
(
MAKE
)
${
GLEW_CFLAGS
}
${
GLEW_LDFLAGS
}
${
GLEW_STRIP
}
INSTALL_DIR
"
${
GLEW_ROOT
}
"
INSTALL_DIR
"
${
GLEW_ROOT
}
"
INSTALL_COMMAND $
(
MAKE
)
GLEW_DEST=
"
${
GLEW_ROOT
}
"
install && ranlib
"
${
GLEW_ROOT
}
/lib/libGLEW.a"
INSTALL_COMMAND $
(
MAKE
)
GLEW_DEST=
"
${
GLEW_ROOT
}
"
install
)
#
# Optional Steps
#
if
(
APPLE
)
# On OSX is needed to run ranlib to make .a indexes for all platforms
ExternalProject_Add_Step
(
glew glew_osx_ranlib
COMMAND ranlib
"
${
GLEW_ROOT
}
/lib/libGLEW.a"
COMMENT
"ranlib
${
GLEW_ROOT
}
/lib/libGLEW.a - Needed on OSX only"
DEPENDEES install
)
)
endif
()
CMakeModules/download_libpng.cmake
View file @
786bb81c
...
@@ -67,6 +67,7 @@ ExternalProject_Add( libpng
...
@@ -67,6 +67,7 @@ ExternalProject_Add( libpng
#PATCH_COMMAND "true"
#PATCH_COMMAND "true"
CONFIGURE_COMMAND ./configure --prefix=
${
LIBPNG_ROOT
}
${
LIBPNG_OPTS
}
${
LIBPNG_CFLAGS
}
--disable-dependency-tracking
CONFIGURE_COMMAND ./configure --prefix=
${
LIBPNG_ROOT
}
${
LIBPNG_OPTS
}
${
LIBPNG_CFLAGS
}
--disable-dependency-tracking
#BINARY_DIR "${PREFIX}"
#BINARY_DIR "${PREFIX}"
UPDATE_COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
"
${
LIBPNG_ROOT
}
"
BUILD_COMMAND $
(
MAKE
)
BUILD_COMMAND $
(
MAKE
)
...
...
CMakeModules/download_pixman.cmake
View file @
786bb81c
...
@@ -68,6 +68,8 @@ ExternalProject_Add( pixman
...
@@ -68,6 +68,8 @@ ExternalProject_Add( pixman
#SOURCE_DIR "${PREFIX}"
#SOURCE_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
BUILD_IN_SOURCE 1
UPDATE_COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
"
${
PIXMAN_ROOT
}
"
#PATCH_COMMAND "true"
#PATCH_COMMAND "true"
CONFIGURE_COMMAND ./configure --prefix=
${
PIXMAN_ROOT
}
${
PIXMAN_OPTS
}
${
PIXMAN_CPPFLAGS
}
--disable-dependency-tracking
CONFIGURE_COMMAND ./configure --prefix=
${
PIXMAN_ROOT
}
${
PIXMAN_OPTS
}
${
PIXMAN_CPPFLAGS
}
--disable-dependency-tracking
#BINARY_DIR "${PREFIX}"
#BINARY_DIR "${PREFIX}"
...
...
CMakeModules/download_pkgconfig.cmake
View file @
786bb81c
...
@@ -62,19 +62,17 @@ ExternalProject_Add( pkgconfig
...
@@ -62,19 +62,17 @@ ExternalProject_Add( pkgconfig
CONFIGURE_COMMAND ./configure --prefix=
${
PKGCONFIG_ROOT
}
--with-internal-glib
${
PKGCONFIG_BUILDTYPE
}
--disable-silent-rules
CONFIGURE_COMMAND ./configure --prefix=
${
PKGCONFIG_ROOT
}
--with-internal-glib
${
PKGCONFIG_BUILDTYPE
}
--disable-silent-rules
#BINARY_DIR "${PREFIX}"
#BINARY_DIR "${PREFIX}"
UPDATE_COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
"
${
PKGCONFIG_ROOT
}
"
BUILD_COMMAND $
(
MAKE
)
BUILD_COMMAND $
(
MAKE
)
INSTALL_DIR
"
${
PKGCONFIG_ROOT
}
"
INSTALL_DIR
"
${
PKGCONFIG_ROOT
}
"
INSTALL_COMMAND $
(
MAKE
)
install
INSTALL_COMMAND $
(
MAKE
)
install
)
)
#
ExternalProject_Add_Step
(
pkgconfig pkgconfig_cleanup
# At second execution make install will fail ..
COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
"
${
PKGCONFIG_ROOT
}
"
#
COMMENT
"pkgconfig - cleanup destination before proceeding in install"
ExternalProject_Add_Step
(
pkgconfig pkgconfig_erase_dir
COMMAND rm -fr
${
PKGCONFIG_ROOT
}
COMMENT
"*** Erasing pkgconfig directory"
DEPENDEES build
DEPENDEES build
)
)
CMakeModules/download_wxwidgets.cmake
View file @
786bb81c
...
@@ -62,9 +62,11 @@ ExternalProject_Add( libwx
...
@@ -62,9 +62,11 @@ ExternalProject_Add( libwx
BUILD_IN_SOURCE 1
BUILD_IN_SOURCE 1
# wxOverlay PATCH for OSX - http://trac.wxwidgets.org/ticket/12894
PATCH_COMMAND bzr revert
PATCH_COMMAND bzr patch -p0
"
${
PROJECT_SOURCE_DIR
}
/patches/wxwidgets-3.0.0_macosx.patch"
COMMAND bzr patch -p0
"
${
PROJECT_SOURCE_DIR
}
/patches/wxwidgets-3.0.0_macosx.patch"
COMMAND bzr patch -p0
"
${
PROJECT_SOURCE_DIR
}
/patches/wxwidgets-3.0.0_macosx_bug_15908.patch"
UPDATE_COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
"
${
LIBWX_ROOT
}
"
CONFIGURE_COMMAND ./configure --prefix=
${
LIBWX_ROOT
}
-with-opengl --enable-aui --enable-debug_info -with-expat=builtin --with-regex=builtin --enable-utf8
${
LIBWX_ARCHITECTURES
}
${
LIBWX_BUILDTYPE
}
CONFIGURE_COMMAND ./configure --prefix=
${
LIBWX_ROOT
}
-with-opengl --enable-aui --enable-debug_info -with-expat=builtin --with-regex=builtin --enable-utf8
${
LIBWX_ARCHITECTURES
}
${
LIBWX_BUILDTYPE
}
#BINARY_DIR "${PREFIX}"
#BINARY_DIR "${PREFIX}"
...
...
patches/wxwidgets-3.0.0_macosx_bug_15908.patch
0 → 100644
View file @
786bb81c
=== modified file 'src/common/translation.cpp'
--- src/common/translation.cpp 2014-01-26 13:59:40 +0000
+++ src/common/translation.cpp 2014-01-26 15:18:47 +0000
@@ -1611,6 +1611,9 @@
/* static */
const wxString& wxTranslations::GetUntranslatedString(const wxString& str)
{
+ // Marco Serantoni - Dirty Patch
+ // Awaiting for http://trac.wxwidgets.org/ticket/15908
+ if( gs_translationsOwned == false) return str;
wxLocaleUntranslatedStrings& strings = wxThreadInfo.untranslatedStrings;
wxLocaleUntranslatedStrings::iterator i = strings.find(str);
scripts/osx_fixbundle.sh
0 → 100755
View file @
786bb81c
#!/bin/bash
# usage osx_fixbundle.sh <bundle-name> <bzr_root>
if
[[
!
-f
version.h
]]
;
then
echo
"**"
echo
"** ERROR:
$0
doesn't seems to be launched from the kicad's bzr root !!!"
echo
"** Go in the bzr root directory and launch: scripts/osx_fixbundle.sh"
echo
"**"
exit
1
fi
EXECUTABLES
=
"
`
find
.
-name
'*.app'
`
"
#
# Copies libraries under <bzr_root> in the bundle and relocates them in the binary
#
function
fixbundle
()
{
exec
=
"
$1
"
bzroot
=
"
$2
"
execpath
=
"
$3
"
LIBRARIES
=
"
`
otool
-L
${
execpath
}${
exec
}
.app/Contents/MacOS/
${
exec
}
|
cut
-d
' '
-f1
`
"
for
library
in
$LIBRARIES
;
do
mkdir
-p
${
execpath
}${
exec
}
.app/Contents/Frameworks
if
[[
"
$library
"
=
~
"
$2
"
]]
;
then
echo
"
${
exec
}
: Migrating
`
basename
$library
`
in the bundle"
cp
-f
$library
${
execpath
}${
exec
}
.app/Contents/Frameworks
install_name_tool
-change
$library
@executable_path/../Frameworks/
`
basename
$library
`
${
execpath
}${
exec
}
.app/Contents/MacOS/
${
exec
}
fi
done
}
#fixbundle $1 $2 $3
for
executable
in
$EXECUTABLES
;
do
myexecpath
=
"
`
dirname
${
executable
}
`
/"
myexec
=
"
`
basename
${
executable
}
|sed
-e
's/\.app//'
`
"
fixbundle
"
${
myexec
}
"
"
`
pwd
`
"
"
${
myexecpath
}
"
done
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