Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1
.
Reverted for updates as this currently breaks kicad-mac-builder
This commit is contained in:
parent
88a58803ca
commit
098e8f7d9b
|
@ -124,7 +124,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
|
|||
std::list< wxString > pluginlist;
|
||||
wxFileName fn;
|
||||
|
||||
#ifndef __MACOSX_APP__
|
||||
#ifndef __WXMAC__
|
||||
|
||||
#ifdef DEBUG
|
||||
// set up to work from the build directory
|
||||
|
|
|
@ -35,7 +35,7 @@ endif( MINGW )
|
|||
|
||||
add_library( kicad_3dsg SHARED ${SG_FILES} )
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# puts library into the main kicad.app bundle in build tree
|
||||
set_target_properties( kicad_3dsg PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${OSX_BUNDLE_BUILD_LIB_DIR}"
|
||||
|
@ -108,4 +108,4 @@ install( TARGETS
|
|||
if( KICAD_WIN32_INSTALL_PDBS )
|
||||
# Get the PDBs to copy over for MSVC
|
||||
install(FILES $<TARGET_PDB_FILE:kicad_3dsg> DESTINATION ${KICAD_BIN})
|
||||
endif()
|
||||
endif()
|
|
@ -166,11 +166,6 @@ if( KICAD_USE_3DCONNEXION )
|
|||
endif()
|
||||
endif()
|
||||
|
||||
cmake_dependent_option( KICAD_MACOSX_APP_BUNDLE
|
||||
"Create macOS Application bundle"
|
||||
ON "APPLE"
|
||||
OFF )
|
||||
|
||||
# Global setting: exports are explicit
|
||||
set( CMAKE_CXX_VISIBILITY_PRESET "hidden" )
|
||||
set( CMAKE_VISIBILITY_INLINES_HIDDEN ON )
|
||||
|
@ -192,10 +187,6 @@ if( KICAD_GAL_PROFILE )
|
|||
add_definitions( -DKICAD_GAL_PROFILE )
|
||||
endif()
|
||||
|
||||
if ( KICAD_MACOSX_APP_BUNDLE )
|
||||
add_definitions ( -D__MACOSX_APP__ )
|
||||
endif()
|
||||
|
||||
# Ensure DEBUG is defined for all platforms in Debug builds
|
||||
# change to add_compile_definitions() after minimum required CMake version is 3.12
|
||||
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUG> )
|
||||
|
@ -527,7 +518,7 @@ set( KIFACE_PREFIX "_" )
|
|||
#================================================
|
||||
# Locations for install targets.
|
||||
#================================================
|
||||
if( NOT KICAD_MACOSX_APP_BUNDLE )
|
||||
if( NOT APPLE )
|
||||
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
||||
set( KICAD_BIN bin
|
||||
CACHE PATH "Location of KiCad binaries." )
|
||||
|
@ -823,7 +814,7 @@ if( NOT PYTHON_SITE_PACKAGE_PATH )
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set( OSX_BUNDLE_PYTHON_SITE_PACKAGES_DIR ${OSX_BUNDLE_LIB_DIR}/Python.framework/Versions/${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
|
||||
set( OSX_BUNDLE_INSTALL_PYTHON_SITE_PACKAGES_DIR "${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_PYTHON_SITE_PACKAGES_DIR}")
|
||||
set( PYTHON_DEST "${OSX_BUNDLE_BUILD_DIR}/${OSX_BUNDLE_PYTHON_SITE_PACKAGES_DIR}"
|
||||
|
@ -916,7 +907,7 @@ if( MINGW )
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# Remove app bundles in ${KICAD_BIN} before installing anything new.
|
||||
# Must be defined before all includes so that it is executed first.
|
||||
install( CODE "
|
||||
|
|
|
@ -35,7 +35,7 @@ if( WIN32 )
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# setup bundle
|
||||
set( BITMAP2COMPONENT_RESOURCES bitmap2component.icns )
|
||||
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/bitmap2component.icns" PROPERTIES
|
||||
|
@ -57,11 +57,7 @@ target_link_libraries( bitmap2component
|
|||
potrace
|
||||
)
|
||||
|
||||
set_target_properties( bitmap2component PROPERTIES
|
||||
MACOSX_BUNDLE $<BOOL:KICAD_MACOSX_APP_BUNDLE>
|
||||
)
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set_target_properties( bitmap2component PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/bitmap2component/Info.plist
|
||||
)
|
||||
|
|
|
@ -53,7 +53,7 @@ wxString FindKicadFile( const wxString& shortname )
|
|||
{
|
||||
// Test the presence of the file in the directory shortname of
|
||||
// the KiCad binary path.
|
||||
#ifndef __MACOSX_APP__
|
||||
#ifndef __WXMAC__
|
||||
wxString fullFileName = Pgm().GetExecutablePath() + shortname;
|
||||
#else
|
||||
wxString fullFileName = Pgm().GetExecutablePath() + wxT( "Contents/MacOS/" ) + shortname;
|
||||
|
@ -79,7 +79,7 @@ wxString FindKicadFile( const wxString& shortname )
|
|||
|
||||
// Path list for KiCad binary files
|
||||
const static wxChar* possibilities[] = {
|
||||
#if defined( __MACOSX_APP__ )
|
||||
#if defined( __WXMAC__ )
|
||||
// all internal paths are relative to main bundle kicad.app
|
||||
wxT( "Contents/Applications/pcbnew.app/Contents/MacOS/" ),
|
||||
wxT( "Contents/Applications/eeschema.app/Contents/MacOS/" ),
|
||||
|
@ -97,7 +97,7 @@ wxString FindKicadFile( const wxString& shortname )
|
|||
// find binary file from possibilities list:
|
||||
for( unsigned i=0; i<arrayDim(possibilities); ++i )
|
||||
{
|
||||
#ifndef __MACOSX_APP__
|
||||
#ifndef __WXMAC__
|
||||
fullFileName = possibilities[i] + shortname;
|
||||
#else
|
||||
// make relative paths absolute
|
||||
|
|
|
@ -122,7 +122,7 @@ const wxString KIWAY::dso_search_path( FACE_T aFaceId )
|
|||
return wxEmptyString;
|
||||
}
|
||||
|
||||
#ifndef __MACOSX_APP__
|
||||
#ifndef __WXMAC__
|
||||
wxString path;
|
||||
|
||||
if( m_ctl & (KFCTL_STANDALONE | KFCTL_CPP_PROJECT_SUITE) )
|
||||
|
@ -148,7 +148,7 @@ const wxString KIWAY::dso_search_path( FACE_T aFaceId )
|
|||
|
||||
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
|
||||
{
|
||||
#ifdef __MACOSX_APP__
|
||||
#ifdef __WXMAC__
|
||||
// On Mac, all of the kifaces are placed in the kicad.app bundle, even though the individual
|
||||
// standalone binaries are placed in separate bundles before the make install step runs.
|
||||
// So, we have to jump up to the kicad directory, then the PlugIns section of the kicad
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <config.h>
|
||||
|
||||
// lowercase or pretty case depending on platform
|
||||
#if defined( __MACOSX_APP__ ) || defined( __WXMSW__ )
|
||||
#if defined( __WXMAC__ ) || defined( __WXMSW__ )
|
||||
#define KICAD_PATH_STR "KiCad"
|
||||
#else
|
||||
#define KICAD_PATH_STR "kicad"
|
||||
|
@ -154,7 +154,7 @@ wxString PATHS::GetStockDataPath( bool aRespectRunFromBuildDir )
|
|||
if( aRespectRunFromBuildDir && wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
|
||||
{
|
||||
// Allow debugging from build dir by placing relevant files/folders in the build root
|
||||
#if defined( __MACOSX_APP__ )
|
||||
#if defined( __WXMAC__ )
|
||||
wxFileName fn = wxStandardPaths::Get().GetExecutablePath();
|
||||
|
||||
fn.RemoveLastDir();
|
||||
|
@ -170,7 +170,7 @@ wxString PATHS::GetStockDataPath( bool aRespectRunFromBuildDir )
|
|||
}
|
||||
else
|
||||
{
|
||||
#if defined( __MACOSX_APP__ )
|
||||
#if defined( __WXMAC__ )
|
||||
path = GetOSXKicadDataDir();
|
||||
#elif defined( __WXMSW__ )
|
||||
path = getWindowsKiCadRoot() + wxT( "share/kicad" );
|
||||
|
@ -187,7 +187,7 @@ wxString PATHS::GetStockEDALibraryPath()
|
|||
{
|
||||
wxString path;
|
||||
|
||||
#if defined( __MACOSX_APP__ )
|
||||
#if defined( __WXMAC__ )
|
||||
path = GetOSXKicadMachineDataDir();
|
||||
#elif defined( __WXMSW__ )
|
||||
path = GetStockDataPath( false );
|
||||
|
@ -266,7 +266,7 @@ wxString PATHS::GetStockPlugins3DPath()
|
|||
fn.Assign( tfname, "" );
|
||||
fn.AppendDir( wxT( "kicad" ) );
|
||||
fn.AppendDir( wxT( "plugins" ) );
|
||||
#elif defined( __MACOSX_APP__ )
|
||||
#elif defined( __WXMAC__ )
|
||||
fn.Assign( wxStandardPaths::Get().GetPluginsDir(), wxEmptyString );
|
||||
#else
|
||||
fn.AssignDir( Pgm().GetExecutablePath() );
|
||||
|
@ -306,7 +306,7 @@ wxString PATHS::GetDocumentationPath()
|
|||
{
|
||||
wxString path;
|
||||
|
||||
#if defined( __MACOSX_APP__ )
|
||||
#if defined( __WXMAC__ )
|
||||
path = GetOSXKicadDataDir();
|
||||
#elif defined( __WXMSW__ )
|
||||
path = getWindowsKiCadRoot() + "share/doc/kicad";
|
||||
|
|
|
@ -52,7 +52,7 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack )
|
|||
// Otherwise don't set it.
|
||||
maybe.AddPaths( wxGetenv( wxT( "KICAD" ) ) );
|
||||
|
||||
#ifdef __MACOSX_APP__
|
||||
#ifdef __WXMAC__
|
||||
// Add the directory for the user-dependent, program specific data files.
|
||||
maybe.AddPaths( PATHS::GetOSXKicadUserDataDir() );
|
||||
|
||||
|
@ -137,7 +137,7 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack )
|
|||
{
|
||||
wxFileName fn( maybe[i], wxEmptyString );
|
||||
|
||||
#ifndef __MACOSX_APP__
|
||||
#ifndef __WXMAC__
|
||||
if( fn.GetPath().AfterLast( fn.GetPathSeparator() ) == wxT( "bin" ) )
|
||||
{
|
||||
fn.RemoveLastDir();
|
||||
|
@ -149,7 +149,7 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack )
|
|||
|
||||
aSearchStack->AddPaths( fn.GetPath() );
|
||||
|
||||
#ifndef __MACOSX_APP__
|
||||
#ifndef __WXMAC__
|
||||
fn.AppendDir( wxT( "kicad" ) );
|
||||
aSearchStack->AddPaths( fn.GetPath() ); // add maybe[i]/kicad
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ if( MAKE_LINK_MAPS )
|
|||
endif()
|
||||
|
||||
# these 2 binaries are a matched set, keep them together:
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# puts binaries into the *.app bundle while linking
|
||||
set_target_properties( cvpcb_kiface PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
|
||||
|
|
|
@ -355,7 +355,7 @@ set_source_files_properties( sch_text.cpp
|
|||
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sch_text_help_md.h
|
||||
)
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# setup bundle
|
||||
set( EESCHEMA_RESOURCES eeschema.icns eeschema_doc.icns )
|
||||
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/eeschema.icns" PROPERTIES
|
||||
|
@ -386,10 +386,6 @@ target_link_libraries( eeschema
|
|||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
set_target_properties( eeschema PROPERTIES
|
||||
MACOSX_BUNDLE $<BOOL:KICAD_MACOSX_APP_BUNDLE>
|
||||
)
|
||||
|
||||
# the main Eeschema program, in DSO form.
|
||||
add_library( eeschema_kiface_objects OBJECT
|
||||
${EESCHEMA_SRCS}
|
||||
|
@ -458,7 +454,7 @@ if( MAKE_LINK_MAPS )
|
|||
endif()
|
||||
|
||||
# these 2 binaries are a matched set, keep them together:
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set_target_properties( eeschema PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/eeschema/Info.plist
|
||||
)
|
||||
|
|
|
@ -75,7 +75,7 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
|||
#else
|
||||
// For macOS, we want to use the Python we bundle along, rather than just PYTHON_EXECUTABLE.
|
||||
// For non-Windows, non-macOS, we can call out to PYTHON_EXECUTABLE.
|
||||
#ifdef __MACOSX_APP__
|
||||
#ifdef __APPLE__
|
||||
// python is at Contents/Frameworks/Python.framework/Versions/Current/bin/python3
|
||||
|
||||
// Of course, for macOS, it's not quite that simple, since the relative path
|
||||
|
|
|
@ -673,7 +673,7 @@ void NETLIST_DIALOG_ADD_GENERATOR::OnBrowseGenerators( wxCommandEvent& event )
|
|||
{
|
||||
wxString FullFileName, Path;
|
||||
|
||||
#ifndef __MACOSX_APP__
|
||||
#ifndef __WXMAC__
|
||||
Path = Pgm().GetExecutablePath();
|
||||
#else
|
||||
Path = PATHS::GetOSXKicadDataDir() + wxT( "/plugins" );
|
||||
|
|
|
@ -431,7 +431,7 @@ void NGSPICE::init_dll()
|
|||
#else
|
||||
const vector<string> dllPaths = { "", "/mingw64/bin", "/mingw32/bin" };
|
||||
#endif
|
||||
#elif defined(__MACOSX_APP__)
|
||||
#elif defined(__WXMAC__)
|
||||
const vector<string> dllPaths = {
|
||||
PATHS::GetOSXKicadUserDataDir().ToStdString() + "/PlugIns/ngspice",
|
||||
PATHS::GetOSXKicadMachineDataDir().ToStdString() + "/PlugIns/ngspice",
|
||||
|
|
|
@ -89,7 +89,7 @@ if( WIN32 )
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# setup bundle
|
||||
set( GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns )
|
||||
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns" PROPERTIES
|
||||
|
@ -120,10 +120,6 @@ target_link_libraries( gerbview
|
|||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
set_target_properties( gerbview PROPERTIES
|
||||
MACOSX_BUNDLE $<BOOL:KICAD_MACOSX_APP_BUNDLE>
|
||||
)
|
||||
|
||||
if( MAKE_LINK_MAPS )
|
||||
set_target_properties( gerbview PROPERTIES
|
||||
LINK_FLAGS "-Wl,-cref,-Map=gerbview.map" )
|
||||
|
@ -172,7 +168,7 @@ endif()
|
|||
add_dependencies( gerbview gerbview_kiface )
|
||||
|
||||
# these 2 binaries are a matched set, keep them together
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set_target_properties( gerbview PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/gerbview/Info.plist
|
||||
)
|
||||
|
|
|
@ -43,7 +43,7 @@ if( WIN32 )
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set( KICAD_RESOURCES kicad.icns kicad_doc.icns )
|
||||
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/kicad.icns" PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION Resources
|
||||
|
@ -62,10 +62,6 @@ add_executable( kicad WIN32 MACOSX_BUNDLE
|
|||
${KICAD_RESOURCES}
|
||||
)
|
||||
|
||||
set_target_properties( kicad PROPERTIES
|
||||
MACOSX_BUNDLE $<BOOL:KICAD_MACOSX_APP_BUNDLE>
|
||||
)
|
||||
|
||||
if( UNIX )
|
||||
# for build directory: create kiface symlinks so kicad (exe) can be run in-situ
|
||||
add_custom_target( kiface_sym_links
|
||||
|
@ -76,7 +72,7 @@ if( UNIX )
|
|||
)
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set_target_properties( kicad PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/kicad/Info.plist
|
||||
)
|
||||
|
@ -108,7 +104,7 @@ if( KICAD_WIN32_INSTALL_PDBS )
|
|||
install(FILES $<TARGET_PDB_FILE:kicad> DESTINATION ${KICAD_BIN})
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# "install( CODE ... )" will launch its own CMake, so no variables from
|
||||
# this CMake instance are accessible... use helper to transfer
|
||||
set( SCRIPTING_HELPER "1" )
|
||||
|
|
|
@ -799,7 +799,7 @@ int KICAD_MANAGER_CONTROL::Execute( const TOOL_EVENT& aEvent )
|
|||
wxString msg = wxString::Format( _( "%s %s opened [pid=%ld]\n" ), execFile, param, pid );
|
||||
m_frame->PrintMsg( msg );
|
||||
|
||||
#ifdef __MACOSX_APP__
|
||||
#ifdef __WXMAC__
|
||||
// This non-parameterized use of wxExecute is fine because execFile is not derived
|
||||
// from user input.
|
||||
wxExecute( "osascript -e 'activate application \"" + execFile + "\"'" );
|
||||
|
|
|
@ -62,7 +62,7 @@ if( WIN32 )
|
|||
endif()
|
||||
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# setup bundle
|
||||
set( PL_EDITOR_RESOURCES pagelayout_editor.icns pagelayout_editor_doc.icns )
|
||||
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pagelayout_editor.icns" PROPERTIES
|
||||
|
@ -93,10 +93,6 @@ target_link_libraries( pl_editor
|
|||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
set_target_properties( pl_editor PROPERTIES
|
||||
MACOSX_BUNDLE $<BOOL:KICAD_MACOSX_APP_BUNDLE>
|
||||
)
|
||||
|
||||
if( MAKE_LINK_MAPS )
|
||||
set_target_properties( pl_editor PROPERTIES
|
||||
LINK_FLAGS "-Wl,-cref,-Map=pl_editor.map" )
|
||||
|
@ -134,7 +130,7 @@ endif()
|
|||
add_dependencies( pl_editor pl_editor_kiface )
|
||||
|
||||
# these 2 binaries are a matched set, keep them together:
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set_target_properties( pl_editor PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/pagelayout_editor/Info.plist
|
||||
)
|
||||
|
@ -181,4 +177,4 @@ if( KICAD_WIN32_INSTALL_PDBS )
|
|||
# Get the PDBs to copy over for MSVC
|
||||
install(FILES $<TARGET_PDB_FILE:pl_editor> DESTINATION ${KICAD_BIN})
|
||||
install(FILES $<TARGET_PDB_FILE:pl_editor_kiface> DESTINATION ${KICAD_BIN})
|
||||
endif()
|
||||
endif()
|
|
@ -58,7 +58,7 @@ if( WIN32 )
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# setup bundle
|
||||
set( PCB_CALCULATOR_RESOURCES pcb_calculator.icns )
|
||||
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcb_calculator.icns" PROPERTIES
|
||||
|
@ -84,10 +84,6 @@ target_link_libraries( pcb_calculator
|
|||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
set_target_properties( pcb_calculator PROPERTIES
|
||||
MACOSX_BUNDLE $<BOOL:KICAD_MACOSX_APP_BUNDLE>
|
||||
)
|
||||
|
||||
if( MAKE_LINK_MAPS )
|
||||
set_target_properties( pcb_calculator PROPERTIES
|
||||
LINK_FLAGS "-Wl,-cref,-Map=pcb_calculator.map" )
|
||||
|
@ -123,7 +119,7 @@ endif()
|
|||
add_dependencies( pcb_calculator pcb_calculator_kiface )
|
||||
|
||||
# these 2 binaries are a matched set, keep them together
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set_target_properties( pcb_calculator PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/pcb_calculator/Info.plist
|
||||
)
|
||||
|
|
|
@ -588,7 +588,7 @@ set_source_files_properties( dialogs/panel_setup_rules.cpp
|
|||
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/panel_setup_rules_help_md.h
|
||||
)
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# setup bundle
|
||||
set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns )
|
||||
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" PROPERTIES
|
||||
|
@ -628,10 +628,6 @@ target_link_libraries( pcbnew
|
|||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
set_target_properties( pcbnew PROPERTIES
|
||||
MACOSX_BUNDLE $<BOOL:KICAD_MACOSX_APP_BUNDLE>
|
||||
)
|
||||
|
||||
if( PCBNEW_LINK_MAPS )
|
||||
set_target_properties( pcbnew PROPERTIES
|
||||
LINK_FLAGS "-Wl,-cref,-Map=pcbnew.map" )
|
||||
|
@ -745,7 +741,7 @@ if( WIN32 )
|
|||
endif()
|
||||
|
||||
# these 2 binaries are a matched set, keep them together:
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set_target_properties( pcbnew PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/pcbnew/Info.plist
|
||||
)
|
||||
|
@ -793,7 +789,7 @@ if( KICAD_WIN32_INSTALL_PDBS )
|
|||
install(FILES $<TARGET_PDB_FILE:pcbnew_kiface> DESTINATION ${KICAD_BIN})
|
||||
endif()
|
||||
|
||||
if( NOT KICAD_MACOSX_APP_BUNDLE )
|
||||
if( NOT APPLE )
|
||||
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} )
|
||||
else()
|
||||
# put into bundle at build time, it is relocated at install
|
||||
|
@ -818,7 +814,7 @@ install( DIRECTORY ${PROJECT_SOURCE_DIR}/pcbnew/python/plugins/
|
|||
if( MINGW OR VCPKG_TOOLCHAIN )
|
||||
install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} )
|
||||
set( PYMOD_EXT "pyd" )
|
||||
elseif( KICAD_MACOSX_APP_BUNDLE )
|
||||
elseif( APPLE )
|
||||
# put everything into bundle at build time, it is relocated at install
|
||||
add_custom_target( ScriptingModulesPcbnewSoCopy ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
|
||||
|
@ -832,7 +828,7 @@ else() # only linux remains among supported platforms
|
|||
set( PYMOD_EXT "so" )
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
||||
DEPENDS pcbnew_kiface
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${OSX_BUNDLE_BUILD_KIFACE_DIR}/_pcbnew.kiface _pcbnew.${PYMOD_EXT}
|
||||
|
@ -856,7 +852,7 @@ else()
|
|||
endif()
|
||||
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# If we don't have wxPython, then we must create the site-packages directory
|
||||
add_custom_target( ScriptingPythonDirectoryCreation ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${PYTHON_DEST}"
|
||||
|
|
|
@ -29,7 +29,7 @@ target_link_libraries( s3d_plugin_idf
|
|||
${OPENGL_LIBRARIES}
|
||||
${wxWidgets_LIBRARIES} )
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# puts library into the main kicad.app bundle in build tree
|
||||
set_target_properties( s3d_plugin_idf PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${OSX_BUNDLE_BUILD_PLUGIN_DIR}/3d"
|
||||
|
@ -45,4 +45,4 @@ install( TARGETS
|
|||
if( KICAD_WIN32_INSTALL_PDBS )
|
||||
# Get the PDBs to copy over for MSVC
|
||||
install(FILES $<TARGET_PDB_FILE:s3d_plugin_idf> DESTINATION ${KICAD_USER_PLUGIN}/3d)
|
||||
endif()
|
||||
endif()
|
|
@ -23,7 +23,7 @@ target_include_directories( s3d_plugin_oce PRIVATE
|
|||
$<TARGET_PROPERTY:gzip-hpp,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# puts library into the main kicad.app bundle in build tree
|
||||
set_target_properties( s3d_plugin_oce PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${OSX_BUNDLE_BUILD_PLUGIN_DIR}/3d"
|
||||
|
@ -39,4 +39,4 @@ install( TARGETS
|
|||
if( KICAD_WIN32_INSTALL_PDBS )
|
||||
# Get the PDBs to copy over for MSVC
|
||||
install(FILES $<TARGET_PDB_FILE:s3d_plugin_oce> DESTINATION ${KICAD_USER_PLUGIN}/3d)
|
||||
endif()
|
||||
endif()
|
|
@ -71,7 +71,7 @@ target_include_directories( s3d_plugin_vrml PRIVATE
|
|||
$<TARGET_PROPERTY:gzip-hpp,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# puts library into the main kicad.app bundle in build tree
|
||||
set_target_properties( s3d_plugin_vrml PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${OSX_BUNDLE_BUILD_PLUGIN_DIR}/3d"
|
||||
|
@ -87,4 +87,4 @@ install( TARGETS
|
|||
if( KICAD_WIN32_INSTALL_PDBS )
|
||||
# Get the PDBs to copy over for MSVC
|
||||
install(FILES $<TARGET_PDB_FILE:s3d_plugin_vrml> DESTINATION ${KICAD_USER_PLUGIN}/3d)
|
||||
endif()
|
||||
endif()
|
|
@ -62,7 +62,7 @@ if( MAKE_LINK_MAPS )
|
|||
LINK_FLAGS "-Wl,-cref,-Map=_scripting.kiface.map" )
|
||||
endif()
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
set_target_properties( scripting_kiface PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
|
||||
)
|
||||
|
@ -82,4 +82,4 @@ endif()
|
|||
install( DIRECTORY ${PROJECT_SOURCE_DIR}/scripting/kicad_pyshell/
|
||||
DESTINATION ${KICAD_DATA}/scripting/kicad_pyshell
|
||||
FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
|
||||
)
|
||||
)
|
|
@ -154,7 +154,7 @@ bool SCRIPTING::scriptingSetup()
|
|||
wxSetEnv( wxT( "PATH" ), kipython );
|
||||
}
|
||||
#endif
|
||||
#elif defined( __MACOSX_APP__ )
|
||||
#elif defined( __WXMAC__ )
|
||||
|
||||
// Add default paths to PYTHONPATH
|
||||
wxString pypath;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
if( UNIX AND KICAD_I18N_UNIX_STRICT_PATH )
|
||||
set( KICAD_I18N_PATH ${CMAKE_INSTALL_PREFIX}/share/locale
|
||||
CACHE PATH "Location of KiCad i18n files." )
|
||||
elseif( KICAD_MACOSX_APP_BUNDLE )
|
||||
elseif( APPLE )
|
||||
set( KICAD_I18N_PATH ${KICAD_DATA}/internat
|
||||
CACHE PATH "Location of KiCad i18n files." )
|
||||
else()
|
||||
|
|
|
@ -42,7 +42,7 @@ target_link_libraries( idf2vrml
|
|||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# puts binaries into the *.app bundle while linking
|
||||
set_target_properties( idfcyl idfrect dxf2idf idf2vrml PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_BIN_DIR}
|
||||
|
|
|
@ -59,7 +59,7 @@ target_include_directories( kicad2step_lib PRIVATE
|
|||
set_target_properties( kicad2step_bin
|
||||
PROPERTIES OUTPUT_NAME kicad2step)
|
||||
|
||||
if( KICAD_MACOSX_APP_BUNDLE )
|
||||
if( APPLE )
|
||||
# puts binaries into the *.app bundle while linking
|
||||
set_target_properties( kicad2step_bin PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_BIN_DIR}
|
||||
|
|
Loading…
Reference in New Issue