CMake not able to find magnum plug-ins installed with vcpkg - c++

I've cloned and am trying to compile & run a c++ project from here: https://git.ist.ac.at/gsperl/MADYPG
I've installed all the dependencies as listed with vcpkg, but I am getting an error regarding the jpeg, and png importer magnum plug-ins, despite having installed them directly with vcpkg. Has anyone run into something similar before?
logs:
['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake']
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- Found OpenMP: TRUE (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
-- Found Corrade: C:/dev/vcpkg/installed/x64-windows/include found components: Main
-- Found Corrade: C:/dev/vcpkg/installed/x64-windows/include found components: Containers rc Utility PluginManager
-- Found Magnum: C:/dev/vcpkg/installed/x64-windows/include found components: Trade GL MeshTools Primitives SceneGraph Shaders Sdl2Application DebugTools AnyImageImporter
-- Found Corrade: C:/dev/vcpkg/installed/x64-windows/include found components: Containers rc Utility
-- Found Magnum: C:/dev/vcpkg/installed/x64-windows/include found components: GL Shaders
-- Found Corrade: C:/dev/vcpkg/installed/x64-windows/include found components: Containers rc Utility PluginManager
-- Found Magnum: C:/dev/vcpkg/installed/x64-windows/include found components: Trade
CMake Error at C:/Users/user/Desktop/cmake-3.23.0-rc2-windows-x86_64/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find MagnumPlugins (missing: PngImporter JpegImporter)
Call Stack (most recent call first):
C:/Users/user/Desktop/cmake-3.23.0-rc2-windows-x86_64/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/dev/vcpkg/installed/x64-windows/share/cmake/MagnumPlugins/FindMagnumPlugins.cmake:468 (find_package_handle_standard_args)
C:/dev/vcpkg/installed/x64-windows/share/cmake/MagnumPlugins/MagnumPluginsConfig.cmake:26 (include)
C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:782 (_find_package)
CMakeLists.txt:104 (find_package)
-- Configuring incomplete, errors occurred!
I've seen this similar thread as well cmake cannot find libraries installed with vcpkg, but all other packages seem to be found by cmake without issue, so the solution required here is probably more specific. Any help very appreciated!
here's the cmakeLists.txt I'm using: https://git.ist.ac.at/gsperl/MADYPG/-/blob/master/src/CMakeLists.txt

Related

"TBB library cannot be found" CMake on MacOS

I'm trying to build PrusaSlicer from source on Mac. I don't have any experience with CMake. I'm following the instructions given here.
Every time I try to build dependencies. This command cmake ..gives me errors. Earlier it was saying "Boost cannot be found." I fixed that by installing boost with brew. Now it's stuck on TBB.
OS X SDK Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk
OS X Deployment Target: (default)
-- Boost::boost exists
CMake Error at /opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
TBB library cannot be found. Consider set TBBROOT environment variable.
(missing: TBB_LIBRARIES) (found version "2020.3")
Call Stack (most recent call first):
/opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindTBB.cmake.in:286 (find_package_handle_standard_args)
cmake/modules/FindTBB.cmake:29 (include)
CMakeLists.txt:384 (find_package)
-- Configuring incomplete, errors occurred!
I have installed TBB. If you would notice even this error has the version listed.
Things I have tried:
Installing boost, cmake and tbb via brew.
Installing boost, cmake and tbb via macports.
Try the following
cmake .. -DTBB_LIBRARYDIR=/opt/intel/tbb/lib/intel64/gcc4.8 -DTBB_INCLUDEDIR=/opt/intel/tbb/include
Note the subtle differences in the CMake var names and the path to include, not include/tbb.Let me know how that goes

Could NOT find MPI_C and MPI cmake on Ubuntu 18.04

- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'libusb-1.0>=1.0.17'
-- Found libusb-1.0, version 1.0.21
-- Checking for module 'opencv>=3.0'
-- Found opencv, version 3.2.0
-- Checking for module 'libcaer>=2.0'
-- Found libcaer, version 3.3.7
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1")
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find MPI (missing: MPI_C_FOUND) (found version "3.1")
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.10/Modules/FindMPI.cmake:1444 (find_package_handle_standard_args)
CMakeLists.txt:193 (find_package)
Tried everything exported the paths done everything I've found on google still have this annoying error.
Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version (3.10.2-1ubuntu2.18.04.1).
Which command results:
endrel#Siraly:~/Developer/BrainHarmonics/build$ which mpicc
/usr/bin/mpicc
endrel#Siraly:~/Developer/BrainHarmonics/build$ which mpicxx
/usr/bin/mpicxx
From FindMPI.cmake module:
If the find procedure fails for a variable MPI_<lang>_WORKS, then the settings detected by or passed to the module did not work and even a simple MPI test program failed to compile.
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
Your mpicc is found but probably not working correctly.
Maybe your CMakeLists.txt is wrong, but you didn't provide it's content, so it's hard to say.

How to build flann in windows 10 from source?

I was trying to build flann from source in Windows-10 using cmake. During the installation process it says it cannot find liblz4.
I tried two method :
1) So I downloaded the prebuild lz4 from here (https://github.com/lz4/lz4/releases) and placed the C:\XXXX\Downloads\lz4_v1_9_1_win64\dll to my env path.
2) I used vcpkg to install lz4 first. Then did
C:\source\flann\build> cmake .. -DCMAKE_TOOLCHAIN_FILE=C:\XXXXXX\source\vcpkg\scripts\buildsystems\vcpkg.cmake -G "Visual Studio 15 2017 Win64".
None of the above two method worked. I still get cannot find liblz4 error.
-- Found PkgConfig: C:/XXXXXX/Downloads/cmake-3.13.3-win64-x64/bin/pkg-config.exe (found version "0.26") -- Checking for module 'liblz4' -- No package 'liblz4' found CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/FindPkgConfig.cmake:452 (message): A required package was not found Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.13/Modules/FindPkgConfig.cmake:622 (_pkg_check_modules_internal) CMakeLists.txt:150 (pkg_check_modules) -- Configuring incomplete, errors occurred! See also "C:/XXXXXXX/source/flann/build/CMakeFiles/CMakeOutput.log".
Did you try to do as follows?(https://github.com/lz4/lz4)
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
vcpkg install lz4

Error in building Assimp in Cmake

Hi I'm trying to build Assimp with Cmake but the following error message appears everytime I try to configure Assimp. The version of Cmake is 3.11.0 and assimp is 4.0.0.
Looking for DirectX...
DirectX_PREFIX_PATH changed.
Found DirectX: C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/d3d9.lib
DX lib dir: C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86
Looking for ZLIB...
Found PkgConfig: C:/cygwin/bin/pkg-config.exe (found version "0.29.1")
Checking for module 'zzip-zlib-config'
No package 'zzip-zlib-config' found
Could not locate ZLIB
compiling zlib from sources
CMake Deprecation Warning at contrib/zlib/CMakeLists.txt:8 (cmake_policy):
The OLD behavior for policy CMP0048 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of off64_t
Check size of off64_t - failed
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - not found
Could NOT find rt (missing: RT_LIBRARY)
Enabled formats: AMF 3DS AC ASE ASSBIN ASSXML B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS MD2 MD3 MD5 MDC MDL NFF NDO OFF OBJ OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD
Disabled formats:
Looking for DirectX...
DirectX_PREFIX_PATH changed.
DX lib dir: C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86
Could NOT find IL (missing: IL_LIBRARIES IL_INCLUDE_DIR)
CMake Error at C:/cygwin/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:27 (message):
The imported target "Qt5::Gui" references the file
"C:/cygwin/include/qt5/"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"C:/cygwin/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake"
but not all the files it references.
Call Stack (most recent call first):
C:/cygwin/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:68 (_qt5_Gui_check_file_exists)
C:/cygwin/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
tools/assimp_qt_viewer/CMakeLists.txt:19 (FIND_PACKAGE)
Configuring incomplete, errors occurred!
See also "C:/Users/peter/Desktop/assimp-master/assimp-master/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/peter/Desktop/assimp-master/assimp-master/build/CMakeFiles/CMakeError.log".
For the configuration generator I used Visual Studio 15 2017 since I'm using that for my IDE. Is there anyway that this can be solved?
Please try the latest version of assimp ( 4.1.0 ). The cygwin-cmake file was broken. This shall work with the latest version.
As a workaround diable the tools-support for assimp ( the library will be build, but the qt5-based viewer not ):
cmake CMakelists.txt -DASSIMP_BUILD_ASSIMP_TOOLS=OFF
This will fix your cmake-error, because the tools will not be affected by cmake.

Gruel required to compile myblock

So I was following the gnuradio tutorial on building an OOT. However i got into trouble with boost so i followed a solution that made me install boost and export by the command:
export LD_LIBRARY_PATH=$BOOST_PREFIX/lib
I did that and got into another error after running cmake (below)
$cmake ../
-- Build type not specified: defaulting to release.
-- Boost version: 1.53.0
-- Found the following Boost libraries:
-- filesystem
-- system
-- checking for module 'gruel'
-- package 'gruel' not found
-- Could NOT find GRUEL (missing: GRUEL_LIBRARIES GRUEL_INCLUDE_DIRS)
-- checking for module 'gnuradio-core'
-- package 'gnuradio-core' not found
-- Could NOT find GNURADIO_CORE (missing: GNURADIO_CORE_LIBRARIES GNURADIO_CORE_INCLUDE_DIRS)
-- checking for module 'cppunit'
-- package 'cppunit' not found
-- Could NOT find CPPUNIT (missing: CPPUNIT_INCLUDE_DIRS)
CMake Error at CMakeLists.txt:91 (message):
Gruel required to compile newblock
-- Configuring incomplete, errors occurred!
please can any one help me solve this problem and add blocks to gnu radio
You're missing the cppunit development headers; please install them.
The errors about Gruel indicate that you're trying to use a OOT template that was made for an older version of GNU Radio. Gruel was part of old versions of GNU Radio, and has been merged into other parts of GNU Radio, and is not available anymore.
The correct way of generating a module is using gr_modtool, which comes with GNU Radio, and automatically will only generate valid OOTs. This is rather nicely documented in the official Guided Tutorials, gr_modtool nm my_module_name, see Tutorial 3.
Best regards,
Marcus