Hi There,
I have been successfully building KiCad from source under Linux and wanted to now build KiCad under windows using MSYS2 & CLion. I followed this guide here: https://dev-docs.kicad.org/en/build/windows-msys2/
When compiling using the MSYS2 console everything compiles just fine. However, as soon as I try to use CLion, CMAKE throws errors. I attached the console output.
C:\msys64\mingw64\bin\cmake.exe -DCMAKE_BUILD_TYPE=Debug -G βMinGW Makefilesβ -DCMAKE_PREFIX_PATH=/mingw64 -DCMAKE_INSTALL_PREFIX=/mingw64 -DDEFAULT_INSTALL_PATH=/mingw64 β¦/β¦/ C:\msys64\home\andre\kicad-source
β The C compiler identification is GNU 10.2.0
β The CXX compiler identification is GNU 10.2.0
β Detecting C compiler ABI info
β Detecting C compiler ABI info - done
β Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe - skipped
β Detecting C compile features
β Detecting C compile features - done
β Detecting CXX compiler ABI info
β Detecting CXX compiler ABI info - done
β Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe - skipped
β Detecting CXX compile features
β Detecting CXX compile features - done
β KiCad install dir:
β Looking for strtok_r
β Looking for strtok_r - found
β Looking for malloc
β Looking for malloc - found
β Looking for math.h
β Looking for math.h - found
β Looking for C++ include cmath
β Looking for C++ include cmath - found
β Looking for asinh
β Looking for asinh - found
β Looking for acosh
β Looking for acosh - found
β Looking for atanh
β Looking for atanh - found
β Performing Test HAVE_CMATH_ISINF
β Performing Test HAVE_CMATH_ISINF - Success
β Looking for clock_gettime in rt
β Looking for clock_gettime in rt - not found
β Looking for gettimeofday
β Looking for gettimeofday - found
β Looking for getc_unlocked
β Looking for getc_unlocked - not found
β Performing Test COMPILER_SUPPORTS_WSUGGEST_OVERRIDE
β Performing Test COMPILER_SUPPORTS_WSUGGEST_OVERRIDE - Success
β Enabling warning -Wsuggest-override
β Performing Test COMPILER_SUPPORTS_WINCONSISTENT_MISSING_OVERRIDE
β Performing Test COMPILER_SUPPORTS_WINCONSISTENT_MISSING_OVERRIDE - Failed
β Performing Test COMPILER_SUPPORTS_WDUPLICATED_BRANCHES
β Performing Test COMPILER_SUPPORTS_WDUPLICATED_BRANCHES - Success
β Enabling warning -Wduplicated-branches
β Performing Test COMPILER_SUPPORTS_WDUPLICATED_COND
β Performing Test COMPILER_SUPPORTS_WDUPLICATED_COND - Success
β Enabling warning -Wduplicated-cond
β Performing Test COMPILER_SUPPORTS_WVLA
β Performing Test COMPILER_SUPPORTS_WVLA - Success
β Enabling error for -Wvla
β Performing Test COMPILER_SUPPORTS_WIMPLICIT_FALLTHROUGH
β Performing Test COMPILER_SUPPORTS_WIMPLICIT_FALLTHROUGH - Success
β Enabling warning -Wimplicit-fallthrough
β Performing Test COMPILER_SUPPORTS_WRETURN_TYPE
β Performing Test COMPILER_SUPPORTS_WRETURN_TYPE - Success
β Enabling error for -Wreturn-type
β Performing Test COMPILER_SUPPORTS_WSHADOW
β Performing Test COMPILER_SUPPORTS_WSHADOW - Success
β Enabling warning -Wshadow
β Performing Test COMPILER_SUPPORTS_WSIGN
β Performing Test COMPILER_SUPPORTS_WSIGN - Success
β Enabling warning -Wsign-compare
β Performing Test COMPILER_SUPPORTS_WMISSING_INIT
β Performing Test COMPILER_SUPPORTS_WMISSING_INIT - Success
β Enabling warning -Wmissing-field-initializers
β Performing Test COMPILER_SUPPORTS_WEMPTY_BODY
β Performing Test COMPILER_SUPPORTS_WEMPTY_BODY - Success
β Enabling warning -Wempty-body
β Performing Test COMPILER_SUPPORTS_WREORDER
β Performing Test COMPILER_SUPPORTS_WREORDER - Success
β Enabling warning -Wreorder
β Performing Test COMPILER_SUPPORTS_WMISMATCHED_TAGS
β Performing Test COMPILER_SUPPORTS_WMISMATCHED_TAGS - Success
β Enabling warning -Wmismatched-tags
β Performing Test COMPILER_SUPPORTS_WIMPLICIT_FLOAT_CONVERSION
β Performing Test COMPILER_SUPPORTS_WIMPLICIT_FLOAT_CONVERSION - Failed
β Performing Test COMPILER_SUPPORTS_WPSABI
β Performing Test COMPILER_SUPPORTS_WPSABI - Success
β Disabling warning -Wpsabi
β Found OpenGL: opengl32
β Found GLEW: C:/msys64/mingw64/include
β Check for installed GLEW β found
β Found GLM: C:/msys64/mingw64/include (found suitable version β0.9.9.8β, minimum required is β0.9.8β)
β Found ZLIB: C:/msys64/mingw64/lib/libz.dll.a (found version β1.2.11β)
β Check for installed ZLIB β found
β Found CURL: C:/msys64/mingw64/lib/libcurl.dll.a (found version β7.75.0β)
β Found PkgConfig: C:/msys64/mingw64/bin/pkg-config.exe (found version β1.7.3β)
β Checking for module βcairoβ
β Found cairo, version 1.17.4
β Found Cairo: C:/msys64/mingw64/lib/libcairo.dll.a (found suitable version β1.17.4β, minimum required is β1.12β)
β Checking for module βpixman-1β
β Found pixman-1, version 0.40.0
β Found Pixman: C:/msys64/mingw64/lib/libpixman-1.dll.a (found suitable version β0.40.0β, minimum required is β0.30β)
β Found Boost: C:/msys64/mingw64/include (found suitable version β1.75.0β, minimum required is β1.59.0β)
β Checking for module βngspiceβ
β Found ngspice, version 34
β Found ngspice: C:/msys64/mingw64/include
β Found SWIG: C:/msys64/mingw64/bin/swig.exe (found suitable version β4.0.2β, minimum required is β3.0β)
β Found PythonInterp: C:/msys64/mingw64/bin/python2.exe (found suitable version β2.7.18β, minimum required is β2.6β)
β Check for installed Python Interpreter β found
β Python module install path: lib/python2.7/site-packages
β Found PythonLibs: C:/msys64/mingw64/lib/libpython2.7.dll.a (found suitable version β2.7.18β, minimum required is β2.6β)
C:\msys64\mingw64\lib\python2.7\site-packages\wx-3.0-msw/wx/_core.py:16633: UserWarning: wxPython/wxWidgets release number mismatch
warnings.warn(βwxPython/wxWidgets release number mismatchβ)
β Found wxPython 3.0.2.0/msw (wxWidgets 3.0.2.0)
CMake Error at C:/msys64/mingw64/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
wxWidgets_INCLUDE_DIRS) (Required is at least version β3.0.2.0β)
Call Stack (most recent call first):
C:/msys64/mingw64/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
CMakeModules/FindwxWidgets.cmake:1019 (find_package_handle_standard_args)
CMakeLists.txt:920 (find_package)
β Configuring incomplete, errors occurred!
See also βC:/msys64/home/andre/kicad-source/CMakeFiles/CMakeOutput.logβ.
See also βC:/msys64/home/andre/kicad-source/CMakeFiles/CMakeError.logβ.
[Finished]