From 5ed7e282522b22a54e06b537c913e858f36e7b5f Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 18 Aug 2022 13:11:37 -0700 Subject: [PATCH] Remove KICAD_OCC build option We don't really support builds without OCC these days. Removing to clear up build flags and settings --- CMakeLists.txt | 34 ++++++++++++---------------------- CMakeSettings.json.sample | 25 ------------------------- common/build_version.cpp | 9 --------- kicad/CMakeLists.txt | 4 +--- plugins/3d/CMakeLists.txt | 5 +---- utils/CMakeLists.txt | 5 +---- 6 files changed, 15 insertions(+), 67 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b9b9ba8b91..50f18aed3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,10 +62,6 @@ option( KICAD_SCRIPTING_WXPYTHON ON ) mark_as_advanced( KICAD_SCRIPTING_WXPYTHON ) -option( KICAD_USE_OCC - "Build tools and plugins related to OpenCascade Technology (default ON)" - ON ) - option( KICAD_INSTALL_DEMOS "Install KiCad demos and examples (default ON)" ON ) @@ -516,10 +512,6 @@ if( KICAD_SPICE ) add_definitions( -DKICAD_SPICE ) endif() -if( KICAD_USE_OCC ) - add_definitions( -DKICAD_USE_OCC ) -endif() - if( KICAD_SIGNAL_INTEGRITY ) add_definitions( -DKICAD_SIGNAL_INTEGRITY ) endif() @@ -797,21 +789,19 @@ if( KICAD_SPICE ) endif() # Find OpenCascade, required for STEP plugin and tools -if( KICAD_USE_OCC ) - find_package(OCC) - if( NOT OCC_FOUND ) - MESSAGE( FATAL_ERROR "================================================================\n" - " KICAD_USE_OCC=True but OpenCASCADE was not found!\n" - "================================================================\n") - endif() - if( OCC_VERSION_STRING VERSION_LESS 7.3.0 ) - MESSAGE( FATAL_ERROR "================================================================\n" - "OpenCASCADE version ${OCC_VERSION_STRING} was found.\n" - " KiCad requires a minimum version of 7.3.0\n" - "================================================================\n") - endif() - include_directories( SYSTEM ${OCC_INCLUDE_DIR} ) +find_package(OCC) +if( NOT OCC_FOUND ) + MESSAGE( FATAL_ERROR "================================================================\n" + " OpenCASCADE was not found!\n" + "================================================================\n") endif() +if( OCC_VERSION_STRING VERSION_LESS 7.3.0 ) + MESSAGE( FATAL_ERROR "================================================================\n" + "OpenCASCADE version ${OCC_VERSION_STRING} was found.\n" + " KiCad requires a minimum version of 7.3.0\n" + "================================================================\n") +endif() +include_directories( SYSTEM ${OCC_INCLUDE_DIR} ) # Assist with header file searching optimization: # INC_BEFORE and INC_AFTER are two lists which go at the front and back of the diff --git a/CMakeSettings.json.sample b/CMakeSettings.json.sample index be5dc19e96..a5570d2122 100644 --- a/CMakeSettings.json.sample +++ b/CMakeSettings.json.sample @@ -36,11 +36,6 @@ "value": "ON", "type": "STRING" }, - { - "name": "KICAD_USE_OCC", - "value": "ON", - "type": "BOOL" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", @@ -70,11 +65,6 @@ "value": "ON", "type": "STRING" }, - { - "name": "KICAD_USE_OCC", - "value": "ON", - "type": "BOOL" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", @@ -104,11 +94,6 @@ "value": "ON", "type": "STRING" }, - { - "name": "KICAD_USE_OCC", - "value": "ON", - "type": "BOOL" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", @@ -138,11 +123,6 @@ "value": "ON", "type": "STRING" }, - { - "name": "KICAD_USE_OCC", - "value": "ON", - "type": "BOOL" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", @@ -182,11 +162,6 @@ "value": "ON", "type": "STRING" }, - { - "name": "KICAD_USE_OCC", - "value": "OFF", - "type": "BOOL" - }, { "name": "KICAD_BUILD_QA_TESTS", "value": "False", diff --git a/common/build_version.cpp b/common/build_version.cpp index fafae3117a..b53da1a072 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -37,9 +37,7 @@ extern std::string GetKicadCurlVersion(); extern std::string GetCurlLibVersion(); -#if defined( KICAD_USE_OCC ) #include -#endif #if defined( KICAD_SPICE ) #include @@ -184,10 +182,7 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief ) << ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 ) << eol; -#ifdef KICAD_USE_OCC aMsg << indent4 << "OCC: " << OCC_VERSION_COMPLETE << eol; -#endif - aMsg << indent4 << "Curl: " << GetCurlLibVersion() << eol; #if defined( KICAD_SPICE ) @@ -228,10 +223,6 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief ) // Add build settings config (build options): aMsg << "Build settings:" << eol; -#ifdef KICAD_USE_OCC - aMsg << indent4 << "KICAD_USE_OCC=" << ON; -#endif - #ifdef KICAD_USE_EGL aMsg << indent4 << "KICAD_USE_EGL=" << ON; #endif diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 5926bb3f52..56d348ea6d 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -128,9 +128,7 @@ if( APPLE ) set( BUNDLE_FIX_DIRS ${BUNDLE_FIX_DIRS} ${MACOS_EXTRA_BUNDLE_FIX_DIRS} ) # TODO: where should we document MACOS_EXTRA_BUNDLE_FIX_DIRS? endif() - if( KICAD_USE_OCC ) - set( BUNDLE_FIX_DIRS ${BUNDLE_FIX_DIRS} ${OCC_LIBRARY_DIR} ) - endif() + set( BUNDLE_FIX_DIRS ${BUNDLE_FIX_DIRS} ${OCC_LIBRARY_DIR} ) # make main bundle relocatable install( CODE " diff --git a/plugins/3d/CMakeLists.txt b/plugins/3d/CMakeLists.txt index daa8433d2b..9c5e4095ae 100644 --- a/plugins/3d/CMakeLists.txt +++ b/plugins/3d/CMakeLists.txt @@ -1,6 +1,3 @@ add_subdirectory( idf ) add_subdirectory( vrml ) - -if( KICAD_USE_OCC ) - add_subdirectory( oce ) -endif( KICAD_USE_OCC ) +add_subdirectory( oce ) \ No newline at end of file diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 8c7af70faa..2e46fda968 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -5,7 +5,4 @@ if( COMPILER_SUPPORTS_WARNINGS ) endif() add_subdirectory( idftools ) - -if( KICAD_USE_OCC ) - add_subdirectory( kicad2step ) -endif( KICAD_USE_OCC ) +add_subdirectory( kicad2step )