From 098e8f7d9bd07239015fb09ae724aa6547de2cb7 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 31 Jan 2022 15:57:56 -0800 Subject: [PATCH] Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option" This reverts commit ea9f960cc15d9383ac88bd7fa499f28ebda096b3. Reverted for updates as this currently breaks kicad-mac-builder --- 3d-viewer/3d_cache/3d_plugin_manager.cpp | 2 +- 3d-viewer/3d_cache/sg/CMakeLists.txt | 4 ++-- CMakeLists.txt | 15 +++------------ bitmap2component/CMakeLists.txt | 8 ++------ common/gestfich.cpp | 6 +++--- common/kiway.cpp | 4 ++-- common/paths.cpp | 12 ++++++------ common/systemdirsappend.cpp | 6 +++--- cvpcb/CMakeLists.txt | 2 +- eeschema/CMakeLists.txt | 8 ++------ eeschema/bom_plugins.cpp | 2 +- eeschema/dialogs/dialog_netlist.cpp | 2 +- eeschema/sim/ngspice.cpp | 2 +- gerbview/CMakeLists.txt | 8 ++------ kicad/CMakeLists.txt | 10 +++------- kicad/tools/kicad_manager_control.cpp | 2 +- pagelayout_editor/CMakeLists.txt | 10 +++------- pcb_calculator/CMakeLists.txt | 8 ++------ pcbnew/CMakeLists.txt | 16 ++++++---------- plugins/3d/idf/CMakeLists.txt | 4 ++-- plugins/3d/oce/CMakeLists.txt | 4 ++-- plugins/3d/vrml/CMakeLists.txt | 4 ++-- scripting/CMakeLists.txt | 4 ++-- scripting/python_scripting.cpp | 2 +- translation/CMakeLists.txt | 2 +- utils/idftools/CMakeLists.txt | 2 +- utils/kicad2step/CMakeLists.txt | 2 +- 27 files changed, 57 insertions(+), 94 deletions(-) diff --git a/3d-viewer/3d_cache/3d_plugin_manager.cpp b/3d-viewer/3d_cache/3d_plugin_manager.cpp index b47e438420..cf9def2a29 100644 --- a/3d-viewer/3d_cache/3d_plugin_manager.cpp +++ b/3d-viewer/3d_cache/3d_plugin_manager.cpp @@ -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 diff --git a/3d-viewer/3d_cache/sg/CMakeLists.txt b/3d-viewer/3d_cache/sg/CMakeLists.txt index 13d1e6a688..0899a1925b 100644 --- a/3d-viewer/3d_cache/sg/CMakeLists.txt +++ b/3d-viewer/3d_cache/sg/CMakeLists.txt @@ -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 $ DESTINATION ${KICAD_BIN}) -endif() +endif() \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b08d05a4c..16e60f8ca1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $<$: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 " diff --git a/bitmap2component/CMakeLists.txt b/bitmap2component/CMakeLists.txt index 52dee70f27..3b45e9d348 100644 --- a/bitmap2component/CMakeLists.txt +++ b/bitmap2component/CMakeLists.txt @@ -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 $ - ) - -if( KICAD_MACOSX_APP_BUNDLE ) +if( APPLE ) set_target_properties( bitmap2component PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${PROJECT_BINARY_DIR}/bitmap2component/Info.plist ) diff --git a/common/gestfich.cpp b/common/gestfich.cpp index cd2d727474..7ad46c0a2f 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -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 // 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"; diff --git a/common/systemdirsappend.cpp b/common/systemdirsappend.cpp index 8997c0268a..d322fab161 100644 --- a/common/systemdirsappend.cpp +++ b/common/systemdirsappend.cpp @@ -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 diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index e81167954f..eb68a4f6a4 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -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} diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 19d8099a07..a0ac2fec17 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -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 $ - ) - # 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 ) diff --git a/eeschema/bom_plugins.cpp b/eeschema/bom_plugins.cpp index 9f4715f7b9..b18c680123 100644 --- a/eeschema/bom_plugins.cpp +++ b/eeschema/bom_plugins.cpp @@ -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 diff --git a/eeschema/dialogs/dialog_netlist.cpp b/eeschema/dialogs/dialog_netlist.cpp index 45dfa0da6a..7ed6153fe0 100644 --- a/eeschema/dialogs/dialog_netlist.cpp +++ b/eeschema/dialogs/dialog_netlist.cpp @@ -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" ); diff --git a/eeschema/sim/ngspice.cpp b/eeschema/sim/ngspice.cpp index 7690f7f937..4d2c0a6f2c 100644 --- a/eeschema/sim/ngspice.cpp +++ b/eeschema/sim/ngspice.cpp @@ -431,7 +431,7 @@ void NGSPICE::init_dll() #else const vector dllPaths = { "", "/mingw64/bin", "/mingw32/bin" }; #endif -#elif defined(__MACOSX_APP__) +#elif defined(__WXMAC__) const vector dllPaths = { PATHS::GetOSXKicadUserDataDir().ToStdString() + "/PlugIns/ngspice", PATHS::GetOSXKicadMachineDataDir().ToStdString() + "/PlugIns/ngspice", diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 701ebb6e0b..e41408813f 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -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 $ - ) - 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 ) diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index b24f59f8ee..a90c37d2ab 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -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 $ - ) - 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 $ 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" ) diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp index 30a1992ec8..0d6bdab3cc 100644 --- a/kicad/tools/kicad_manager_control.cpp +++ b/kicad/tools/kicad_manager_control.cpp @@ -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 + "\"'" ); diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index 1110bdbd67..b3c940aabb 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -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 $ - ) - 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 $ DESTINATION ${KICAD_BIN}) install(FILES $ DESTINATION ${KICAD_BIN}) -endif() +endif() \ No newline at end of file diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 2e84c0d32d..2069c9e835 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -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 $ - ) - 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 ) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 2e17db2ac2..fe2ba0dbea 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -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 $ - ) - 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 $ 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}" diff --git a/plugins/3d/idf/CMakeLists.txt b/plugins/3d/idf/CMakeLists.txt index a417d38f88..7bcc7656dd 100644 --- a/plugins/3d/idf/CMakeLists.txt +++ b/plugins/3d/idf/CMakeLists.txt @@ -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 $ DESTINATION ${KICAD_USER_PLUGIN}/3d) -endif() +endif() \ No newline at end of file diff --git a/plugins/3d/oce/CMakeLists.txt b/plugins/3d/oce/CMakeLists.txt index 5998fb7c15..074df30a67 100644 --- a/plugins/3d/oce/CMakeLists.txt +++ b/plugins/3d/oce/CMakeLists.txt @@ -23,7 +23,7 @@ target_include_directories( s3d_plugin_oce PRIVATE $ ) -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 $ DESTINATION ${KICAD_USER_PLUGIN}/3d) -endif() +endif() \ No newline at end of file diff --git a/plugins/3d/vrml/CMakeLists.txt b/plugins/3d/vrml/CMakeLists.txt index ebe3a7f7c7..b651598842 100644 --- a/plugins/3d/vrml/CMakeLists.txt +++ b/plugins/3d/vrml/CMakeLists.txt @@ -71,7 +71,7 @@ target_include_directories( s3d_plugin_vrml PRIVATE $ ) -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 $ DESTINATION ${KICAD_USER_PLUGIN}/3d) -endif() +endif() \ No newline at end of file diff --git a/scripting/CMakeLists.txt b/scripting/CMakeLists.txt index 851afbeaf5..07e7e33d9a 100644 --- a/scripting/CMakeLists.txt +++ b/scripting/CMakeLists.txt @@ -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 -) +) \ No newline at end of file diff --git a/scripting/python_scripting.cpp b/scripting/python_scripting.cpp index b2531e8891..e292887ff0 100644 --- a/scripting/python_scripting.cpp +++ b/scripting/python_scripting.cpp @@ -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; diff --git a/translation/CMakeLists.txt b/translation/CMakeLists.txt index 9dd622f018..6a71974fb0 100644 --- a/translation/CMakeLists.txt +++ b/translation/CMakeLists.txt @@ -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() diff --git a/utils/idftools/CMakeLists.txt b/utils/idftools/CMakeLists.txt index 2cfc6bed06..c6dbff6dfa 100644 --- a/utils/idftools/CMakeLists.txt +++ b/utils/idftools/CMakeLists.txt @@ -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} diff --git a/utils/kicad2step/CMakeLists.txt b/utils/kicad2step/CMakeLists.txt index 5eb4bb177b..2bc9c94e29 100644 --- a/utils/kicad2step/CMakeLists.txt +++ b/utils/kicad2step/CMakeLists.txt @@ -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}