no package 'sigc++-2.0' found with cmake, vcpkg and pkg-config on windows 10 - cmake

I am trying to build synfig project with cmake, vcpkg and pkg-config on windows 10 with below commands:
d:\gtkmm\vs>cmake -DCMAKE_TOOLCHAIN_FILE=C:\src\vcpkg\scripts\buildsystems\vcpkg.cmake ..\synfig\
and with errors:
-- Building for: Visual Studio 15 2017
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.16.27043.0
-- The CXX compiler identification is MSVC 19.16.27043.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.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:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE: Debug
-- Found Git: C:/Program Files/Git/bin/git.exe (found version "2.27.0.windows.1")
CMake Deprecation Warning at ETL/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found Boost: C:/src/vcpkg/installed/x86-windows/include (found version "1.73.0") found components: system
-- Found ZLIB: optimized;C:/src/vcpkg/installed/x86-windows/lib/zlib.lib;debug;C:/src/vcpkg/installed/x86-windows/debug/lib/zlibd.lib (found version "1.2.11")
-- Found PkgConfig: C:/pkgconfig/pkg-config.exe (found version "0.26")
-- Checking for module 'sigc++-2.0'
-- No package 'sigc++-2.0' found
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.19/Modules/FindPkgConfig.cmake:553 (message):
A required package was not found
Call Stack (most recent call first):
C:/Program Files (x86)/CMake/share/cmake-3.19/Modules/FindPkgConfig.cmake:741 (_pkg_check_modules_internal)
synfig-core/src/CMakeLists.txt:27 (pkg_check_modules)
-- Configuring incomplete, errors occurred!
See also "D:/gtkmm/vs/CMakeFiles/CMakeOutput.log".
See also "D:/gtkmm/vs/CMakeFiles/CMakeError.log".
My vcpkg is placed in c:\src\vcpkg
CMkake is installed in C:/Program Files (x86)/CMake/
and downloaded pkg-config files in C:\pkgconfig according to here
I think the pkg-config don't know the place the sigc++ installed with vcpkg, because when I check the libsigcpp with command:
vcpkg install libsigcpp
it tells:
Computing installation plan...
The following packages are already installed:
libsigcpp[core]:x86-windows
Package libsigcpp:x86-windows is already installed
Can anyone help, thank you in advance.

Related

MinGW on Windows: cmake arguments to find wxWidgets?

Similar questions already exist but I haven't found an answer that works.
I need to build a wxWidgets project in Windows using MinGW, I would like to use the cmake command from the command line (I installed mingw, cmake and bash using chocolatey)
I would like to avoid compiling wxWidgets so I am using the pre-built binaries MinGW-w64 10.2 (Headers + Dev x64 + Release x64), I unpack them to C:\wxWidgets-3.1.5
I've tried a number of combinations of arguments for cmake but haven't found one that works on the first run, I say first run because I've found one that works on the second:
cmake .. -G "MinGW Makefiles" \
-DwxWidgets_ROOT_DIR=/c/wxWidgets-3.1.5/ \
-DwxWidgets_LIB_DIR=/c/wxWidgets-3.1.5/lib/gcc1020_x64_dll/
I am not a cmake expert but I imagine that by specifying these arguments in the first run they are cached and in the second run they are used, bypassing the search.
What I would like to know is what arguments I have to give to get them to be found correctly, _CONFIGURATION, _ROOT_DIR, _LIBRARIES, _INCLUDE_DIRS don't seem to have any effect.
↓ edit ↓
CMakelists.txt:
cmake_minimum_required(VERSION 3.18)
project(Test)
set(wxWidgets_USE_LIBS)
find_package(wxWidgets REQUIRED)
if(wxWidgets_FOUND)
include(${wxWidgets_USE_FILE})
add_executable(MyTest WIN32 main.cpp)
target_link_libraries(MyTest ${wxWidgets_LIBRARIES})
else(wxWidgets_FOUND)
message("wxWidgets not found!")
endif(wxWidgets_FOUND)
command line used:
cmake .. -G "MinGW Makefiles" -DwxWidgets_ROOT_DIR=/c/wxWidgets-3.1.5/ -DwxWidgets_LIB_DIR=/c/wxWidgets-3.1.5/lib/gcc1020_x64_dll/ -DwxWidgets_wxrc_EXECUTABLE=/c/wxWidgets-3.1.5/lib/gcc1020_x64_dll/wxrc.exe -DCMAKE_BUILD_TYPE=Release -DwxWidgets_LIBRARIES=/c/wxWidgets-3.1.5/lib/gcc1020_x64_dll/ -DwxWidgets_INCLUDE_DIRS=/c/wxWidgets-3.1.5/include/
first run:
-- 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:/ProgramData/chocolatey/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:/ProgramData/chocolatey/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS core base)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Alex/Documents/Progetti/wx-test/build
wxWidgets not found!
second run:
-- Found wxWidgets: debug;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxmsw31ud_core.a;optimized;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxmsw31u_core.a;debug;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxbase31ud.a;optimized;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxbase31u.a;debug;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxbase31ud_net.a;optimized;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxbase31u_net.a;debug;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxpngd.a;optimized;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxpng.a;debug;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxtiffd.a;optimized;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxtiff.a;debug;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxjpegd.a;optimized;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxjpeg.a;debug;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxzlibd.a;optimized;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxzlib.a;debug;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxregexud.a;optimized;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxregexu.a;debug;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxexpatd.a;optimized;C:/wxWidgets-3.1.5/lib/gcc1020_x64_dll/libwxexpat.a;winmm;comctl32;uuid;oleacc;uxtheme;rpcrt4;shlwapi;version;wsock32 (found version "3.1.5") found components: core base net png tiff jpeg zlib regex expat
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Alex/Documents/Progetti/wx-test/build
if I use find_package(wxWidgets REQUIRED):
CMake Error at C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
wxWidgets_INCLUDE_DIRS)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.21/Modules/FindwxWidgets.cmake:1025 (find_package_handle_standard_args)
CMakeLists.txt:24 (find_package)
Thanks to Process Monitor I noticed that FindwxWidgets.cmake looks for libraries in gcc_dll/ (not gcc2010_x64_dll/), once the directory was renamed cmake -G "MinGW Makefiles" -DwxWidgets_ROOT_DIR=/c/wxWidgets-3.1.5 was enough to find the directory on the first run.

Which dev packages are needed to build a QtQuick application on Ubuntu 20.04?

I created a template QtQuick project (for CMake) in Qt Creator and it builds fine in the IDE with "official" Qt SDK.
However, when trying to build in CLI against the system Qt in Ubuntu 20.04 I get:
$ mkdir build
$ cd build
$ cmake ..
-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
Could not find a package configuration file provided by "Qt5Quick" with any
of the following names:
Qt5QuickConfig.cmake
qt5quick-config.cmake
Add the installation prefix of "Qt5Quick" to CMAKE_PREFIX_PATH or set
"Qt5Quick_DIR" to a directory containing one of the above files. If
"Qt5Quick" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:28 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/juzzlin/QmlTest/build/CMakeFiles/CMakeOutput.log".
What is it that I need to install in addition to qt5-default and qtquickcontrols2-5-dev (not sure if this is needed) ?
The missing package was qtdeclarative5-dev.

CMake error while trying to install gr-osmosdr

I've been trying to install gr-osmosdr for quite some time but I never get to end the installation process. I've followed the steps on https://github.com/osmocom/gr-osmosdr
which show how to install gr-osmosdr via cmake. After cloning and building the "build" directory, it's time for cmake to do its job. It is at this step that things begin to fail. I get the following error:
CMake Warning (dev) at /home/victor/.local/lib/python2.7/site-packages/cmake/data/share/cmake-3.18/Modules/GNUInstallDirs.cmake:225 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
CMakeLists.txt:24 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
CMake Error at CMakeLists.txt:44 (find_package):
Could not find a configuration file for package "Gnuradio" that is
compatible with requested version "3.8".
The following configuration files were considered but not accepted:
/usr/lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake, version: 3.7.9.1
-- Configuring incomplete, errors occurred!
See also "/home/victor/gr-osmosdr/build/CMakeFiles/CMakeOutput.log".
At this point I'm unable to continue the installation process. I'm running Ubuntu 16.04.7 LTS and GNU Radio 3.7.9.
Thanks
The error message is quite descriptive: You're trying to build a modern GNU Radio 3.8-compatible gr-osmosdr with an ancient GNU Radio 3.7.9.1. Won't work. You could try building an outdated version of gr-osmosdr, but really, instead you should just upgrade to Ubuntu 20.04.
There, you can just
sudo apt install gnuradio gr-osmosdr
and don't have to build anything yourself (it will just work!).

Unknown CMake command "add_py_modules"

I'm setting up to build openage, a clone of AoE2 genie engine. My cmake command is not being processed. Is "add_py_modules" not possible here?
This is for windows 10, using vcpkg. Command used :
cmake -DCMAKE_TOOLCHAIN_FILE=C:\Software\vcpkg/scripts/buildsystems/vcpkg.cmake ..
CMakeLists.txt:
# python module configurations
# python config file is created in libopenage
# in order to get options from libopenage
cmake_minimum_required(VERSION 3.15)
project(openage)
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
add_py_modules(
__init__.py
__main__.py
assets.py
${CMAKE_CURRENT_BINARY_DIR}/config.py
default_dirs.py
NOINSTALL devmode.py
)
add_cython_modules(
cython_check.pyx
)
add_subdirectory(cabextract)
add_subdirectory(codegen)
add_subdirectory(convert)
add_subdirectory(cppinterface)
add_subdirectory(cvar)
add_subdirectory(event)
add_subdirectory(game)
add_subdirectory(log)
add_subdirectory(util)
add_subdirectory(renderer)
add_subdirectory(testing)
Output:
-- Building for: Visual Studio 16 2019
CMake Warning at C:/Software/vcpkg/scripts/buildsystems/vcpkg.cmake:107
(message):
There are no libraries installed for the Vcpkg triplet x64-windows.
Call Stack (most recent call first):
C:/Software/cmake-3.15.0-rc2-win64-x64/share/cmake-3.15/Modules/CMakeDetermineSystem.cmake:93 (include)
CMakeLists.txt:7 (project)
-- The C compiler identification is MSVC 19.21.27702.2
-- The CXX compiler identification is MSVC 19.21.27702.2
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.21.27702/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.21.27702/bin/Hostx64/x64/cl.exe --
works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.21.27702/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.21.27702/bin/Hostx64/x64/cl.exe --
works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:10 (add_py_modules):
Unknown CMake command "add_py_modules".
-- Configuring incomplete, errors occurred!
See also
"C:/Users/kafon/Desktop/openage/openage/build/CMakeFiles/CMakeOutput.log".
PS C:\Users\kafon\Desktop\openage\openage\build>
Getting
Unknown CMake command
error when configuring someone's else project usually means, that wrong source directory has been chosen.
In your case the correct source directory is the top-level directory in the repository, but you use its openage subdirectory. This is why you got the error.

Why is this find_package failing in newer CMake versions?

I am experiencing a problem in a project, when upgrading from CMake 3.8 to 3.14. I have reduced this to the following issue. Note that project is before find_package (the other way around I do not have the issue I am describing).
cmake_minimum_required(VERSION 3.2.1)
find_package(MPI REQUIRED)
project(Test CXX)).
When I build with CMake 3.8, the output is as follows:
build3_8$ cmake ../source/
-- The CXX compiler identification is Intel 17.0.5.20170817
-- Check for working CXX compiler: (...)/linux/bin/intel64/icpc
-- Check for working CXX compiler: (...)/linux/bin/intel64/icpc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: (...)/build3_8
With CMake 3.14 I get the following output:
build3_14$ cmake ../source/
CMake Error at (...)/CMake/3.14.0/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:211 (message):
No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()
Call Stack (most recent call first):
(...)/CMake/3.14.0/share/cmake-3.14/Modules/FindMPI.cmake:1672 (find_package_handle_standard_args)
CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
I wonder why this is happening with the newer CMake version (although FindMPI.cmake is completely different)?
Also, what can I do to solve this? Do I need to write my own config?
(I cannot just change the order of project and find_package, because wrappers are created for the compilers (not my choice, please don't blame me))