The following configuration files were considered but not accepted: - cmake

I am new in Cmake thats why I will write story detailed.
I trying to build one lib under windows and that lib depends on other lib. (libmatroska depends on libebml) source libmatroska and source libebml
Fortunately both libs can be build with cmake.
I built libebml successfuly with cmake. And also built binaries using VS studio.
Then I tried to deal with libmatroska:
During first try I got:
Could not find a package configuration file provided by "Ebml" (requested
version 1.3.5) with any of the following names:
EbmlConfig.cmake
ebml-config.cmake
at libebml sources I found EbmlConfig.cmake.
I Type export Ebml_DIR=D:/work/mkv/libebml and try again.
On second run I got:
Could not find a configuration file for package "Ebml" that is compatible
with requested version "1.3.5".
The following configuration files were considered but not accepted:
D:/work/mkv/libebml/EbmlConfig.cmake, version: unknown
And after few hours I am still stuck on it.
I can't understand root of this error.
Is it something wrong with EbmlConfig.cmake?
... or maybe I specified path to wrong *.cmake file?
... or I need to install libebml some how before handling libmatroska?
I will be happy for any clue.
UPDATE:
Here EbmlConfig.cmake context:
include(${CMAKE_CURRENT_LIST_DIR}/EbmlTargets.cmake)
Where EbmlTargets.cmake is file generated while Ebml compilation.
I tried to change path inside EbmlConfig.cmake to global path. But got same error.
Also when I delete context of EbmlConfig.cmake I still have same error.
It looks like "default error when something goes wrong"

Related

How can I resolve the "Could not find the required component 'libdlib'" error?

I am trying to to compile this ROS package but I get the following error
Could not find a package configuration file provided by "libdlib" with any of the following names:
libdlibConfig.cmake
libdlib-config.cmake
Add the installation prefix of "libdlib" to CMAKE_PREFIX_PATH or set
"libdlib_DIR" to a directory containing one of the above files. If
"libdlib" provides a separate development package or SDK, be sure it has
been installed.
Referencing some other answers on SO and elsewhere, I have added the following lines to CMakeLists.txt
include(/home//src/dlib/dlib/cmake)
include_directories (${dlib_INCLUDE_DIRS})
target_link_libraries(room_segmentation_server ${dlib_LIBRARIES})
I have also installed dlib using these instructions but the error persists.
What am I missing or doing wrong?
First of all: it is way more easy to help you, if you provide your code and the exact error you're facing.
I suppose, that you are trying to find the library with help of find_package(dlib CONFIG)?!
libdlibConfig.cmake is a CMake-File that needs to be provided by your dlib installation. This file has everthing written into it for your cmake, to find the include- and library paths of your dlib-installation. With its help, your cmake then sets the Variables that you're trying to use: dlib_INCLUDE_DIRS and dlib_LIBRARIES (pointing to its corresponding paths).
Therefor that your cmake-call complains, that such a libdlibConfig.cmake couldn't be found, you either do not have such a file on your system, or it is not in the expected directory. In both ways: the variables that you are trying to use, will not be set. Alternatively there might be a FindDlib.cmake-File on your system, that does almost the same, that you could refer to by find_package(Dlib).
If you do not have either of those two file, you need to specify the paths to the include-dir and library-dir on your own:
set(dlib_LIBRARIES "<path to your libdlib.dll>")
set(dlib_INCLUDE_DIR "<path to your dlib/include-folder>")
find_library(LIBDLIB dlib ${dlib_LIBRARIES})
target_include_directories(<your_target> ${dlib_INCLUDE_DIR})
target_link_libraries(<your_target> LIBDLIB)

cmake always use my pc installed library instead of my target path

I get a project that was built for x86, and I am trying to make it work with mips. But I encounter problem when modifying the CMakelists.txt.
So here is the problem, the following code always use my PC's x86 library:
PKG_CHECK_MODULES(LIBCRYPTO REQUIRED libcrypto)
IF(LIBCRYPTO_FOUND)
INCLUDE_DIRECTORIES(${LIBCRYPTO_INCLUDE_DIRS})
LINK_DIRECTORIES(${LIBCRYPTO_LIB_DIRS})
ENDIF(LIBCRYPTO_FOUND)
I googled and found they always use system library first and can use find_package with NO_CMAKE_SYSTEM_PATH flag. But its not working and give me the following message. I don't know what its talking about..
Could not find a package configuration file provided by "libcrypto" with
any of the following names:
libcryptoConfig.cmake
libcrypto-config.cmake
Add the installation prefix of "libcrypto" to CMAKE_PREFIX_PATH or set
"libcrypto_DIR" to a directory containing one of the above files. If
"libcrypto" provides a separate development package or SDK, be sure it has
been installed.
My question is how to properly link a library to the path I assigned to and works like original piece of code?

CMake VTK_DIR-NOTFOUND

VTK_DIR-NOTFOUND is returned when using CMake. I am using CMake GUI and, as other path errors, I can point then to proper path. However, for VTK doesn't work. I am pointing to directory where VTConfig.cmake file and others are. Also tried with all of other VTK dirs but without any sucess. I am using Visual Studio 12 2013 Win 64 configuration for generation but tried with 2010 too.
pointing to path manually,
The first thing I would check is what is the actual find_package() command being invoked where the error occurs? Perhaps that call is something a bit unusual or explicitly has the MODULE keyword (this would prevent the VTKConfig.cmake file from being found).
If that looks okay, check to see if something is modifying the VTK_DIR variable. Insert the following near the top of your top-most CMakeLists.txt file:
variable_watch(VTK_DIR)
This should tell you what, if anything, is modifying it in ways you didn't expect.
Assuming VTK_DIR is not actually being changed, the next thing you could try is setting CMAKE_PREFIX_PATH to the directory containing the VTKConfig.cmake file (you can add this in the CMake GUI if it isn't there already). Maybe also try variable_watch(CMAKE_PREFIX_PATH) too just in case something is modifying that internally in unexpected was as well.
If that still doesn't reveal anything, then it would seem likely that there is something wrong with either your CMake or VTK installation. Perhaps try an earlier CMake version and see if you get any different behaviour.
Although the currently accepted answer is a good way of debugging, it looks like you're building Point Cloud Library (PCL) with the binaries from unancyowen. In which case I suggest ensuring your system environment variables are setup correctly which will automate the process you are currently going through and facilitate the job of the find_package() methods.
Assuming you installed everything in the same directory (i.e. where you have already linked to FLANN and Eigen) the following default PCL 3rd Party Libraries should be added to Path:
C:\Program Files\PCL 1.7.2\3rdParty\FLANN\bin
C:\Program Files\PCL 1.7.2\3rdParty\VTK\bin
C:\Program Files\PCL 1.7.2\3rdParty\Eigen
C:\Program Files\PCL 1.7.2\3rdParty\Boost
Then Qt, OpenNI etc. which are installed separately.
And you can also add:
BOOST_INCLUDEDIR : C:\Program Files\PCL 1.7.2\3rdParty\Boost\include\boost-X_XX\boost (Replace X_XX with your version number)
BOOST_LIBRARYDIR : C:\Program Files\PCL 1.7.2\3rdParty\Boost\lib
BOOST_ROOT : C:\Program Files\PCL 1.7.2\3rdParty\Boost
EIGEN_ROOT : C:\Program Files\PCL 1.7.2\3rdParty\Eigen
In the field where it is showing that
VTK - DIR : NOT FOUND
You can either copy paste the location or type in, or just browse for the file called VTKConfig.cmake. Generally found inside the build folder of VTK. This is how it solved in my case. Have a try!!

mono Newbie. Installed but env vars not set.. maybe things missing

I'm just installing mono to learn how it all works.
I installed mono (mono-2.10.9-gtksharp-2.12.11-win32-0.exe) for the first time and just started to follow on through the Mono Basics page to verify the installation.
http://www.mono-project.com/Mono_Basics
I was surprised that the installer didn't set up the PATH env variable , but once I'd done that I was able to get the first example compiling/running.
But I'm getting compile errors on the second example. So am wondering if I am missing further environment variables/settings?
Are the environment variables used by mono documented anywhere?
I'm also just wondering if the installer is ok or should I be looking for another one...
The error messages are as follows:
C:\Users\Vida\Desktop\Learning\Mono>gmcs hello.cs -pkg:gtk-sharp-2.0
error CS2001: Source file `Files' could not be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/pango-sharp.dll' could not
be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/atk-sharp.dll' could not
be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/gdk-sharp.dll' could not
be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/gtk-sharp.dll' could not
be found
error CS2001: Source file
`(x86)/Mono-2.10.9/lib/mono/gtk-sharp-2.0/glib-sharp.dll' could not
be found
Compilation failed: 6 error(s), 0 warnings
Sounds like some component is confused by the spaces in Program Files (x86) (which is presumably the installation directory.) Try setting the PATH using its short name (normally Progra~2) , or reinstall to a directory that doesn't have spaces. You can also try additionally setting the MONO_PATH environment variable.

org.jdom.Document cannot be resolve. It's indirectly referenced form required .class file

I try to work on RSS and receive the following error: org.jdom.Document cannot be resolve. It's indirectly referenced form required .class file.
I already added the jdom jar to my build path and tried different version but nothing worked.
I checked in the jdom jar, org.jdom.Document is not there, but jdom.src.org.jdom is there instead. If I extracted the source code of the jdom lib to my project and changed the package name to org.jdom, it would resolve the error.
However, I want to use the jar file only, not the actual source.Can anyone help me to resolve the error? Thanks!
Instead of JDOM 2,x, after download JDOM 1.1.3 and added the build/jdom-1.1.3.jar file into Eclipse build path, it fixed the problem.
I see you 'have it fixed'.... but, in case anyone else runs in to the same issue....
I expect that you have the jdom.zip file, not the jdom.jar file. The jdom.zip file is the distribution, and in the jdom/build directory you will find the actual jdom.jar file (or, depending on the version, jdom-1.1.3.jar ).
JDOM 2.x has a different release format (a zip file with a few jars....).
It is confusing, thus the different release format in 2.x
Rolf
I had the same issue and found that the Document or other classes which I was trying to import got changed under jdom2 in my jar. ie downloaded the jdom jars and added in my build path. So to import i changed to "import org.jdom2.Document" instead of "org.jdom.Document".
Check the class files in your jar package "jdom-2.0.6.jar" or in your specific version.
Dennis