Re: [Kicad-developers] Fix CMakeLists.txt
Hi Orson, perfect, thank you very much! Best regards, Marcus Am 27.07.2018 um 09:13 schrieb Maciej Sumiński: Hi Marcus, Actually my memory has let my down this time. I have just checked the patch on msys2 and it worked as expected, so I recommitted the original version. Sorry for the noise. Cheers, Orson On 07/26/2018 11:36 PM, Aimylios wrote: Hi Orson, thank you for taking the time to review and merge my patches! Thank you for the patches, I have just merged them. I have slightly modified the last patch - I realize that you used the correct convention for calling execute_process(), but IIRC it did not work with msys2. Therefore I simply added the suggested ${wxWidgets_CONFIG_OPTIONS} to the command line and preserved "sh -c". Unfortunately, your modified version of my third patch does not work for me. The reason is that wxWidgets_CONFIG_OPTIONS is of type LIST (not STRING). This is the command I use to configure KiCad: cmake \ -DKICAD_SCRIPTING_WXPYTHON=OFF \ -DKICAD_SPICE=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config \ -DwxWidgets_CONFIG_OPTIONS=--toolkit=gtk2 \ . With this, the expression: sh -c "${wxWidgets_CONFIG_EXECUTABLE} ${wxWidgets_CONFIG_OPTIONS} --query-toolkit" evaluates to: sh -c "/usr/bin/wx-config --toolkit=gtk2;--static=no --query-toolkit" and the semicolon (which separates the elements of the list) terminates the command line. Consequently, both --static=no and --query-toolkit are dropped. Instead, you get an error message like "sh: --static=no: command not found." and the build script incorrectly assumes that GTK2 is used, even if we added --toolkit=gtk3 before. I don't have an msys2 build environment, but maybe someone who has can try to check if your memory serves you right and the "correct convention" does not work. We might then have to find an alternative solution. But I am not a CMake guru, so any help is appreciated. Best regards, Marcus ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Fix CMakeLists.txt
Hi Marcus, Actually my memory has let my down this time. I have just checked the patch on msys2 and it worked as expected, so I recommitted the original version. Sorry for the noise. Cheers, Orson On 07/26/2018 11:36 PM, Aimylios wrote: > Hi Orson, > > thank you for taking the time to review and merge my patches! > >> Thank you for the patches, I have just merged them. I have slightly >> modified the last patch - I realize that you used the correct convention >> for calling execute_process(), but IIRC it did not work with msys2. >> Therefore I simply added the suggested ${wxWidgets_CONFIG_OPTIONS} to >> the command line and preserved "sh -c". > > Unfortunately, your modified version of my third patch does not work for > me. The reason is that wxWidgets_CONFIG_OPTIONS is of type LIST (not > STRING). > > This is the command I use to configure KiCad: > cmake \ > -DKICAD_SCRIPTING_WXPYTHON=OFF \ > -DKICAD_SPICE=OFF \ > -DCMAKE_BUILD_TYPE=Release \ > -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config \ > -DwxWidgets_CONFIG_OPTIONS=--toolkit=gtk2 \ > . > > With this, the expression: > sh -c "${wxWidgets_CONFIG_EXECUTABLE} ${wxWidgets_CONFIG_OPTIONS} > --query-toolkit" > > evaluates to: > sh -c "/usr/bin/wx-config --toolkit=gtk2;--static=no --query-toolkit" > > and the semicolon (which separates the elements of the list) terminates > the command line. Consequently, both --static=no and --query-toolkit are > dropped. Instead, you get an error message like "sh: --static=no: > command not found." and the build script incorrectly assumes that GTK2 > is used, even if we added --toolkit=gtk3 before. > > I don't have an msys2 build environment, but maybe someone who has can > try to check if your memory serves you right and the "correct > convention" does not work. > We might then have to find an alternative solution. But I am not a CMake > guru, so any help is appreciated. > > Best regards, > Marcus signature.asc Description: OpenPGP digital signature ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Fix CMakeLists.txt
Hi Orson, thank you for taking the time to review and merge my patches! Thank you for the patches, I have just merged them. I have slightly modified the last patch - I realize that you used the correct convention for calling execute_process(), but IIRC it did not work with msys2. Therefore I simply added the suggested ${wxWidgets_CONFIG_OPTIONS} to the command line and preserved "sh -c". Unfortunately, your modified version of my third patch does not work for me. The reason is that wxWidgets_CONFIG_OPTIONS is of type LIST (not STRING). This is the command I use to configure KiCad: cmake \ -DKICAD_SCRIPTING_WXPYTHON=OFF \ -DKICAD_SPICE=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config \ -DwxWidgets_CONFIG_OPTIONS=--toolkit=gtk2 \ . With this, the expression: sh -c "${wxWidgets_CONFIG_EXECUTABLE} ${wxWidgets_CONFIG_OPTIONS} --query-toolkit" evaluates to: sh -c "/usr/bin/wx-config --toolkit=gtk2;--static=no --query-toolkit" and the semicolon (which separates the elements of the list) terminates the command line. Consequently, both --static=no and --query-toolkit are dropped. Instead, you get an error message like "sh: --static=no: command not found." and the build script incorrectly assumes that GTK2 is used, even if we added --toolkit=gtk3 before. I don't have an msys2 build environment, but maybe someone who has can try to check if your memory serves you right and the "correct convention" does not work. We might then have to find an alternative solution. But I am not a CMake guru, so any help is appreciated. Best regards, Marcus ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Fix CMakeLists.txt
Hi Marcus, Thank you for the patches, I have just merged them. I have slightly modified the last patch - I realize that you used the correct convention for calling execute_process(), but IIRC it did not work with msys2. Therefore I simply added the suggested ${wxWidgets_CONFIG_OPTIONS} to the command line and preserved "sh -c". Cheers, Orosn On 07/21/2018 04:21 PM, Aimylios wrote: > Hi! > > While trying to build KiCad for Fedora 28 I discovered some minor > problems in the main CMakeLists.txt file. Patches attached. > > Best regards, > Marcus > > > ___ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Fix CMakeLists.txt
The patches look fin for me. I suggest you add the [PATCH] tag to your email title next time. Den lør. 21. jul. 2018 kl. 16.21 skrev Aimylios : > > Hi! > > While trying to build KiCad for Fedora 28 I discovered some minor > problems in the main CMakeLists.txt file. Patches attached. > > Best regards, > Marcus > ___ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] Fix CMakeLists.txt
Hi! While trying to build KiCad for Fedora 28 I discovered some minor problems in the main CMakeLists.txt file. Patches attached. Best regards, Marcus >From cbb85acdd95a6b4f91a8369f405a5ff841a424cf Mon Sep 17 00:00:00 2001 From: Marcus A Date: Sat, 21 Jul 2018 08:10:24 +0200 Subject: [PATCH 1/3] Update description of build options Commit 93683d0021c4f592f929e9785abeda9d169ba03b changed the default build options but did not update their description. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2ea761f9..54f235a72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,7 @@ option( USE_WX_OVERLAY "Use wxOverlay: Always ON for MAC (default OFF). Warning, this is experimental" ) option( KICAD_SCRIPTING -"Build the Python scripting support inside KiCad binaries (default OFF)." +"Build the Python scripting support inside KiCad binaries (default ON)." ON ) option( KICAD_SCRIPTING_MODULES @@ -68,7 +68,7 @@ option( KICAD_SCRIPTING_MODULES ON ) option( KICAD_SCRIPTING_WXPYTHON -"Build wxPython implementation for wx interface building in Python and py.shell (default OFF)." +"Build wxPython implementation for wx interface building in Python and py.shell (default ON)." ON ) option( KICAD_SCRIPTING_ACTION_MENU -- 2.17.1 >From 14a749c7a2e2832416a5a5008b992c3f6568393a Mon Sep 17 00:00:00 2001 From: Marcus A Date: Sat, 21 Jul 2018 10:53:07 +0200 Subject: [PATCH 2/3] Fix some typos in CMakeLists.txt --- CMakeLists.txt | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54f235a72..b8cee3cdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ option( KICAD_SCRIPTING_WXPYTHON ON ) option( KICAD_SCRIPTING_ACTION_MENU -"Build a tools menu with registred python plugins: actions plugins (default OFF)." +"Build a tools menu with registered python plugins: actions plugins (default OFF)." ) option( KICAD_USE_OCE @@ -84,14 +84,14 @@ option( KICAD_USE_OCC OFF ) option( KICAD_INSTALL_DEMOS -"Install kicad demos and examples (default ON)" +"Install KiCad demos and examples (default ON)" ON ) # when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled: # PYTHON_EXECUTABLE can be defined when invoking cmake # ( use -DPYTHON_EXECUTABLE=/python.exe or python2 ) # when not defined by user, the default is python.exe under Windows and python2 for others -# python binary file should be is exec path. +# python binary file should be in exec path. # KICAD_SCRIPTING_MODULES requires KICAD_SCRIPTING enable it here if KICAD_SCRIPTING_MODULES is ON if ( KICAD_SCRIPTING_MODULES AND NOT KICAD_SCRIPTING ) @@ -107,7 +107,7 @@ endif() option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON ) -option( KICAD_SPICE "Build Kicad with internal Spice simulator." ON ) +option( KICAD_SPICE "Build KiCad with internal Spice simulator." ON ) # Global setting: exports are explicit set( CMAKE_CXX_VISIBILITY_PRESET "hidden" ) @@ -163,7 +163,7 @@ if( NOT DEFAULT_INSTALL_PATH ) "Location of KiCad data files." ) endif() -message( STATUS "Kicad install dir: <${DEFAULT_INSTALL_PATH}>" ) +message( STATUS "KiCad install dir: <${DEFAULT_INSTALL_PATH}>" ) # Generate build system specific header file. include( PerformFeatureChecks ) @@ -204,7 +204,7 @@ endif() # Unfortunately, the swig autogenerated files have a lot of shadowed variables # and -Wno-shadow does not exist. # Adding -Wshadow can be made only for .cpp files -#and will be added later in CMakeLists.txt +# and will be added later in CMakeLists.txt if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) include(CheckCXXCompilerFlag) @@ -281,7 +281,7 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) # _UNICODE definition seems needed under mingw/gcc 4.8 -# (Kicad uses unicode, and on Windows, wxWidgets >= 2.9.4 is mandatory +# (KiCad uses unicode, and on Windows, wxWidgets >= 2.9.4 is mandatory # and uses unicode) if( GCC_VERSION VERSION_EQUAL 4.8.0 OR GCC_VERSION VERSION_GREATER 4.8.0 ) add_definitions(-D_UNICODE) -- 2.17.1 >From 74db48d6c46f6469bf8d52f9bd77c7dfafe13d44 Mon Sep 17 00:00:00 2001 From: Marcus A Date: Sat, 21 Jul 2018 11:12:46 +0200 Subject: [PATCH 3/3] Fix detection of wxWidgets toolkit wxWidgets_CONFIG_OPTIONS can be utilised to explicitly select GTK2 or GTK3. It must be evaluated when querying the toolkit to avoid a mismatch between the version actually used and the version KiCad assumes to be used. --- CMakeLists.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8cee3cdb..a41740b49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -555,7 +5