0

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.

James Hao
  • 765
  • 2
  • 11
  • 40
  • "I think the pkg-config don't know the place the sigc++ installed with vcpkg" - Yes, vcpkg provides `XXXConfig.cmake` file which helps `find_package(XXX)`. But `pkg-config` utility needs `XXX.pc` file, which is not provided by vcpkg. – Tsyvarev Nov 28 '20 at 14:05
  • @Tsyvarev, thanks for your comment, any suggestion? – James Hao Nov 28 '20 at 14:35
  • Actually, you may search for `sigc++-2.0.pc` file under `C:/src/vcpkg/installed/x86-windows/lib/pkgconfig`. If you have this file, then it could be a way to tell `pkg-config` about that. If you hove have a file `sigc++-3.0.pc`, then you have too new version of this package and need to downgrade it somehow. – Tsyvarev Nov 28 '20 at 15:07
  • there are totally 26 *.pc files, unfortunately, both (sigc++-2.0.pc and sigc++-3.0.pc) are not existed, any way to install them? – James Hao Nov 28 '20 at 15:36
  • These files should be installed along with the package installation. If an installation doesn't have them, you need to try other installation procedure for the package. They have source code [here](https://github.com/libsigcplusplus/libsigcplusplus/tree/master), but I cannot find a branch/tag which has `CMakeLists.txt` with `set (SIGCXX_API_VERSION 2.0)`: either version is 3.0 or `CMakeLists.txt` file is absent. – Tsyvarev Nov 28 '20 at 15:44

0 Answers0