How can I make dolphin-emu's cmake scripts succeed? - cmake

I'm attempting to build dolphin-emu (https://code.google.com/p/dolphin-emu), and I get the following error while running cmake according to the instructions at http://code.google.com/p/dolphin-emu/wiki/Linux_Build.
I don't know much about cmake, and basic googling has not found a solution.
I'm running Linux Mint 12.
$ git clone https://code.google.com/p/dolphin-emu/ dolphin-emu
(...)
$ cd dolphin-emu
dolphin-emu$ mkdir Build
dolphin-emu$ cd Build
dolphin-emu/Build$ cmake ..
x86_64
OpenMP parallelization enabled
ALSA found, enabling ALSA sound backend
ao found, enabling ao sound backend
bluez found, enabling bluetooth support
PulseAudio found, enabling PulseAudio sound backend
-- Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
OpenAL NOT found, disabling OpenAL sound backend
-- checking for modules 'wayland-egl;wayland-client;wayland-cursor'
-- package 'wayland-egl' not found
-- package 'wayland-client' not found
-- package 'wayland-cursor' not found
Wayland support disabled
X11 support enabled
Xrandr found
-- checking for module 'xi>=1.5.0'
-- package 'xi>=1.5.0' not found
libav found, enabling AVI frame dumps
PortAudio not found, disabling mic support
Using static lzo from Externals
-- Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
Using shared SDL
-- checking for module 'libusb-1.0'
-- package 'libusb-1.0' not found
-- libusb-1.0 not found.
Could NOT find SFML (missing: SFML_INCLUDE_DIR)
Using static SFML 1.5 from Externals
-- Could not find miniupnp
Using static miniupnpc from Externals
-- Could not find polarssl
Using PolarSSL from Externals
Using static SOIL from Externals
Using shared zlib
-- checking for one of the modules 'glew>=1.8'
Using static GLEW from Externals
-- Could NOT find wxWidgets (missing: wxWidgets_FOUND)
-- Could NOT find wxWidgets (missing: wxWidgets_FOUND)
Using static wxWidgets from Externals
gthread-2.0 found
pangocairo found
CMake Error at /usr/share/cmake-2.8/Modules/FindGettext.cmake:83 (ADD_CUSTOM_TARGET):
add_custom_target cannot create target "translations" because another
target with the same name already exists. The existing target is a custom
target created in source directory
"/home/jasmuth/Downloads/dolphin-emu/Source/Core/DolphinWX". See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
Source/Core/DolphinWX/CMakeLists.txt:181 (GETTEXT_CREATE_TRANSLATIONS)
-- Configuring incomplete, errors occurred!

Upgrading cmake from 2.8.7 (what comes with apt-get) to 2.8.12 (what is available via source install) fixed the issue.

Related

Why wxWidgets cannot be found during compiling openbabel?

I am trying to install openbabel-2.4.1 in my centos 7 system. The the cmake command (cmake ..) gives information that wxWidgets and Eigen cannot be found:
-- Using included inchi library.
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES)
-- Checking available shared pointer...
-- Use std::tr1::shared_ptr in tr1/memory
-- Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) (Required is at least version "2.91.0")
-- Could NOT find Eigen2 (missing: EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK) (Required is at least version "2.0.0")
-- Checking for module 'cairo'
-- No package 'cairo' found
-- Could NOT find Cairo (missing: CAIRO_LIBRARIES CAIRO_INCLUDE_DIRS)
-- Could NOT find Cairo. PNG output will NOT be supported.
-- Attempting to build the GUI
-- wxWidgets not found => GUI will not be built
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sunyp/software/openbabel/openbabel-2.4.1/build
Actually I have installed wxWidgets-3.1.2 and EIGEN3 and add their lib path to the LD_LIBRARY_PATH environment variable, but why they cannot be found by cmake? And how to solve the problem? Thank you in advance.

Difference in behavior between between "normal" build and ExternalProject_Add

I am trying to build the ceres-solver on linux using CMake's external project feature.
I have a specific version of Eigen that I built and the other dependencies are installed through my packet manager (BLAS, LAPACK and Suitesparse).
If I build Ceres-solver directly from source:
cmake -G Ninja -DEIGEN_INCLUDE_DIR='<path-to-eigen>' -DEIGEN_BUILD_DIR='<path-to-eigen-build>' ..
It automatically finds suitesparse and all its dependencies (BLAS, LAPACK, AMD, COLAMD, etc.) and it build with no problems.
Here is CMake output :
-- Detected Ceres version: 2.0.0 from <path>/ceres-solver/include/ceres/version.h
-- Detected available Ceres threading models: [CXX11_THREADS, OPENMP, NO_THREADS]
-- Building with C++17
-- No preference for use of exported Eigen CMake configuration set, and no hints for include directory provided. Defaulting to preferring an installed/exported Eigen CMake configuration if available.
-- Found installed version of Eigen: <path>/eigen-3.3.5/share/eigen3/cmake
-- Found Eigen version 3.3.5: <path>/eigen-3.3.5/include/eigen3
-- Disabling use of Eigen as a sparse linear algebra library.
This does not affect the covariance estimation algorithm
which can still use the EIGEN_SPARSE_QR algorithm.
-- Found LAPACK library: /usr/lib/liblapack.so;/usr/lib/libblas.so
-- Found AMD headers in: /usr/include
-- Found AMD library: /usr/lib/libamd.so
-- Found CAMD headers in: /usr/include
-- Found CAMD library: /usr/lib/libcamd.so
-- Found COLAMD headers in: /usr/include
-- Found COLAMD library: /usr/lib/libcolamd.so
-- Found CCOLAMD headers in: /usr/include
-- Found CCOLAMD library: /usr/lib/libccolamd.so
-- Found CHOLMOD headers in: /usr/include
-- Found CHOLMOD library: /usr/lib/libcholmod.so
-- Found SUITESPARSEQR headers in: /usr/include
-- Found SUITESPARSEQR library: /usr/lib/libspqr.so
-- Found Intel Thread Building Blocks (TBB) library (2019.0) assuming SuiteSparseQR was compiled with TBB.
-- Found SUITESPARSE_CONFIG headers in: /usr/include
-- Found SUITESPARSE_CONFIG library: /usr/lib/libsuitesparseconfig.so
-- Found LIBRT library: /usr/lib/librt.so
-- Adding librt: /usr/lib/librt.so to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Found METIS library: /usr/lib/libmetis.so
-- Found SuiteSparse 5.4.0, building with SuiteSparse.
-- Building without CXSparse.
-- Building without Apple's Accelerate sparse support.
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Found installed version of gflags: <path>
-- Detected gflags version: 2.2.2
-- Found Google Flags header in: <path>/include, in namespace: google
-- No preference for use of exported glog CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported glog CMake configuration if available.
-- Found installed version of glog: <path>/glog
-- Detected glog version: 0.3.5
-- Found Google Log (glog). Assuming glog was built with gflags support as gflags was found. This will make gflags a public dependency of Ceres.
-- Using Ceres threading model: OPENMP
-- Building Ceres as a static library.
-- Enabling CERES_NO_CXSPARSE in Ceres config.h
-- Enabling CERES_NO_ACCELERATE_SPARSE in Ceres config.h
-- Enabling CERES_USE_OPENMP in Ceres config.h
-- Do not build any example.
-- Configuring done
-- Generating done
But If I build Ceres-solver as an external project, It does not find BLAS (the same BLAS that is automatically found when I build directly from source).
Is there a difference in behavior when building a library through ExternalProject_Add vs. building it separately by hand ? Can options & variables defined in my "master" project (the one calling ExternalProject_Add) leak to the external project (and if yes, how can I prevent that ?).
My call to ExternalProject_Add :
ExternalProject_Add(ceres-solver
PREFIX CeresSolver
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/ceres-solver
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ceres-solver
INSTALL_DIR ${DEFAULT_INSTALL_ROOT}/ceres-solver
LOG_DIR ${DEFAULT_INSTALL_ROOT}/ceres-solver/log
LOG_CONFIGURE ON
CMAKE_ARGS
-DCERES_THREADING_MODEL=OPENMP
-DCMAKE_CXX_STANDARD=17
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${DEFAULT_INSTALL_ROOT}/ceres-solver
-DBUILD_BENCHMARKS=OFF
-DBUILD_DOCUMENTATION=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_SHARED_LIBS=ON
-DBUILD_TESTING=OFF
-DCXSPARSE=OFF
-DEIGENSPARSE=OFF
-DEIGEN_INCLUDE_DIR=${EIGEN3_INCLUDE_DIR}
-DEigen3_DIR=${Eigen3_DIR}
-DSUITESPARSE=ON
-DLAPACK=ON)
And the output of the configure for ceres-solver :
- Detected available Ceres threading models: [CXX11_THREADS, OPENMP, NO_THREADS]
-- Building with C++17
-- Found Eigen version 3.3.5: <path>
-- Disabling use of Eigen as a sparse linear algebra library.
This does not affect the covariance estimation algorithm
which can still use the EIGEN_SPARSE_QR algorithm.
-- Did not find LAPACK library, disabling LAPACK support.
-- Failed to find SuiteSparse - Did not find BLAS library (required for SuiteSparse).
-- Failed to find SuiteSparse - Did not find LAPACK library (required for SuiteSparse).
-- Failed to find SuiteSparse - Did not find AMD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find AMD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CAMD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CAMD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find COLAMD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find COLAMD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CCOLAMD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CCOLAMD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CHOLMOD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CHOLMOD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find SUITESPARSEQR header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find SUITESPARSEQR library (required SuiteSparse component).
-- Failed to find SuiteSparse - Failed to find either: SuiteSparse_config header & library (should be present in all SuiteSparse >= v4 installs), or UFconfig header (should be present in all SuiteSparse < v4 installs).
-- Did not find all SuiteSparse dependencies, disabling SuiteSparse support.
-- Building without CXSparse.
-- Building without Apple's Accelerate sparse support.
===============================================================
Compiling without any sparse library: SuiteSparse, CXSparse
EigenSparse & Apple's Accelerate are all disabled or unavailable.
No sparse linear solvers (SPARSE_NORMAL_CHOLESKY & SPARSE_SCHUR)
will be available when Ceres is used.
===============================================================
-- Found Google Flags header in: <path>, in namespace: google
-- Found Google Log (glog). Assuming glog was built with gflags support as gflags was found. This will make gflags a public dependency of Ceres.
-- Using Ceres threading model: OPENMP
-- Building Ceres as a shared library.
-- Do not build any example.
It seems my build folder was corrupted. I just deleted the build folder & the install folder. When I re-run the install, everything worked perfectly.

Errors while making tdlib example

l am trying to build a java example for the td lib following the README(https://github.com/tdlib/td/tree/master/example/java)
I have got following mistackes. Please tell how can I fix it?
C:\Users\irina\td\jnibuild>cmake -DCMAKE_BUILD_TYPE=Debug -DTD_ENABLE_JNI=ON -DCMAKE_INSTALL_PREFIX:PATH=../example/java/td ..
-- Could NOT find ccache
-- Found OpenSSL: C:/OpenSSL-Win32/include optimized;C:/OpenSSL-Win32/lib/VC/ssleay32MD.lib;debug;C:/OpenSSL-Win32/lib/VC/ssleay32MDd.lib;optimized;C:/OpenSSL-Win32/lib/VC/libeay32MD.lib;debug;C:/OpenSSL-Win32/lib/VC/libeay32MDd.lib
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
CMake Warning at CMakeLists.txt:256 (message):
Not found zlib: skip TDLib, tdactor, tdnet, tddb
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZLIB_LIBRARY
linked by target "tdutils" in directory C:/Users/irina/td/tdutils
-- Configuring incomplete, errors occurred!
See also "C:/Users/irina/td/jnibuild/CMakeFiles/CMakeOutput.log".
See also "C:/Users/irina/td/jnibuild/CMakeFiles/CMakeError.log".
ZLIB for Windows is a part of the GnuWin32 project (I'm not sure whether it is allowed to give links on SO). As I see, the CMakeLists.txt uses find_package to lookup the ZLIB library:
if (NOT ZLIB_FOUND)
find_package(ZLIB)
endif()
if (NOT ZLIB_FOUND)
message(WARNING "Not found zlib: skip TDLib, tdactor, tdnet, tddb")
return()
endif()
How the find_package command works is well described in the official documentation:
The command has two modes by which it searches for packages: “Module” mode and
“Config” mode. Module mode is available when the command is invoked with the
above reduced signature. CMake searches for a file called Find<package>.cmake
in the CMAKE_MODULE_PATH followed by the CMake installation. If the file is
found, it is read and processed by CMake. It is responsible for finding the
package, checking the version, and producing any needed messages. Many find-
modules provide limited or no support for versioning; check the module
documentation. If no module is found and the MODULE option is not given the
command proceeds to Config mode.
I've had a look into FindZLIB.cmake on my Windows machine. The module uses the following path: ZLIB_ROOT and the following registry keys:
"[HKEY_LOCAL_MACHINE\SOFTWARE\GnuWin32\Zlib;InstallPath]"
"$ENV{PROGRAMFILES}/zlib
So, as I understand, if you install GnuWin32 using the installer, the HKLM key will be written down into the registry and CMake will be able to find the path to ZLIB. If you wish to use just the zip-archive, the ZLIB_ROOT parameter must be correctly specified when you run CMake:
cmake -DZLIB_ROOT=<PATH-to-your-unpacked-zlib> -D.....

How to avoid CMAKE error "Could NOT find <package>" when <package> is included as "add_subdirectory" of the same master project

I am trying to create a CMAKE project that includes other third party projects (OGRE3D, CEGUI, etc) and my specific project (or projects). More specifically, I have a directory tree like this:
+ myMasterProject
-----+ OGRE3D_DEPENDENCIES
-----+ OGRE3D_CORE
-----+ CEGUI
-----+ myProject
If I build the libraries manually one by one in the right order everything works fine (even myProject). Every project has its own CMakeLists.txt file, and they almost all use the find_package function. For example, CEGUI needs to find OGRE for the OGRE renderer and returns an error if does not find it with find_package(OGRE REQUIRED). myProject needs both OGRE and CEGUI.
An important detail is that I would not modify the CMakeLists.txt files of the subprojects, as I import them as sub-projects using mercurial or svn (depends on their respective CVS), and I prefer to update them regularly, without modifications (I'm not expert enough to modify them).
Does anyone have an idea on how to get to this result? shall I define all the variables like "OGRE_FOUND", "Boost_FOUND", and their respective sub-variables ("OGRE_LIB", "OGRE_H_PATH" etc) manually in my masterProject/CMakeLists.txt file or is there a "smarter" or "cleaner" way to do it? In any case, these variables have to be defined somehow, because they are needed by the projects...
For the moment, myMasterProject/CMakeLists.txt contains only:
project(myMasterProject)
add_subdirectory("OGRE3D_DEPENDENCIES")
add_subdirectory("OGRE3D_CORE")
add_subdirectory("CEGUI")
add_subdirectory("myProject")
Here is the CMAKE output that I get:
-- Configuring OGRE 1.8.2
-- Detected g++ 4.6.1
-- Enabling GCC visibility flags
-- Search path: /home/me/myMasterProject/build/OGRE3D_CORE/Dependencies;/home/me/myMasterProject/sources/OGRE3D_CORE/Dependencies;/home/me/myMasterProject/build/OGRE3D_CORE/../Dependencies;/home/me/myMasterProject/sources/OGRE3D_CORE/../Dependencies
-- Looking for ZLIB...
-- Found ZLIB: optimized;zlib;debug;zlib
-- Looking for ZZip...
-- Found ZZip: optimized;zziplib;debug;zziplib
-- Looking for FreeImage...
-- checking for module 'freeimage'
-- package 'freeimage' not found
-- Found FreeImage: optimized;FreeImage;debug;FreeImage
-- Looking for FREETYPE...
-- CMAKE_PREFIX_PATH: /home/me/myMasterProject/build/OGRE3D_CORE/Dependencies;/home/me/myMasterProject/sources/OGRE3D_CORE/Dependencies;/home/me/myMasterProject/build/OGRE3D_CORE/../Dependencies;/home/me/myMasterProject/sources/OGRE3D_CORE/../Dependencies;/usr/local;/usr/lib/x86_64-linux-gnu
-- CMAKE_PREFIX_PATH: /home/me/myMasterProject/build/OGRE3D_CORE/Dependencies;/home/me/myMasterProject/sources/OGRE3D_CORE/Dependencies;/home/me/myMasterProject/build/OGRE3D_CORE/../Dependencies;/home/me/myMasterProject/sources/OGRE3D_CORE/../Dependencies;/usr/local;/usr/lib/x86_64-linux-gnu
-- Found FREETYPE: optimized;freetype;debug;freetype
-- Looking for Cg...
-- checking for module 'Cg'
-- package 'Cg' not found
-- Found Cg: optimized;/usr/lib/libCg.so;debug;/usr/lib/libCg.so
-- Looking for POCO...
-- checking for module 'POCO'
-- package 'POCO' not found
-- Could not locate POCO
-- Looking for TBB...
-- Could not locate TBB
-- Looking for GLSL_Optimizer...
-- checking for module 'GLSL_Optimizer'
-- package 'GLSL_Optimizer' not found
-- Could not locate GLSL_Optimizer
-- Looking for HLSL2GLSL...
-- checking for module 'HLSL2GLSL'
-- package 'HLSL2GLSL' not found
-- Could not locate HLSL2GLSL
-- Looking for OIS...
-- Found OIS: optimized;OIS;debug;OIS
-- Looking for Softimage...
-- Could not locate Softimage
-- Looking for CppUnit...
-- Found CppUnit: optimized;/usr/lib/libcppunit.so;debug;/usr/lib/libcppunit.so
--
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ zlib
+ zziplib
+ freeimage
+ freetype
+ X11
+ Xt
+ Xaw
+ OpenGL
+ OpenGL ES 2.x
+ cg
+ boost
+ boost-thread
+ boost-date_time
+ OIS
+ Doxygen
+ CppUnit
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ OpenGL ES 1.x: Support for the OpenGL ES 1.x render system (DEPRECATED) <http://www.khronos.org/opengles/>
+ POCO: POCO framework <http://pocoproject.org/>
+ tbb: Threading Building Blocks <http://www.threadingbuildingblocks.org/>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
+ Softimage: Softimage SDK needed for building XSIExporter <FALSE>
-----------------------------------------------------------------------------
--
----------------------------------------------------------------------------
FEATURE SUMMARY
----------------------------------------------------------------------------
Building components:
+ Paging
+ Property
+ Terrain
+ RTShader System
+ RTShader System Core Shaders
+ RTShader System Extensions Shaders
Building plugins:
+ BSP scene manager
+ Cg program manager
+ Octree scene manager
+ Portal connected zone scene manager
+ Particle FX
Building rendersystems:
+ OpenGL
Building executables:
+ Samples
+ Tools
Building core features:
+ DDS image codec
+ FreeImage codec
+ ZIP archives
Build type: dynamic
Threading support: background (boost)
Use double precision: disabled
Allocator type: nedmalloc (pooling)
STL containers use allocator: enabled
Strings use allocator: disabled
Memory tracker (debug): disabled
Memory tracker (release): disabled
Use new script compilers: enabled
Use Boost: enabled
----------------------------------------------------------------------------
OGRE_LIB = OGRE_LIB-NOTFOUND
OGRE_H_PATH = OGRE_H_PATH-NOTFOUND
OGRE_H_BUILD_SETTINGS_PATH = OGRE_H_BUILD_SETTINGS_PATH-NOTFOUND
CMAKE_MODULE_PATH = /home/me/myMasterProject/sources/CEGUI/cmake
-- Could NOT find PCRE (missing: PCRE_LIB PCRE_H_PATH)
-- Could NOT find MINIZIP (missing: MINIZIP_LIB MINIZIP_H_PATH)
-- Could NOT find GLFW (missing: GLFW_LIB GLFW_H_PATH)
-- Could NOT find DIRECTXSDK (missing: DIRECTXSDK_LIB_PATH DIRECTXSDK_H_PATH DIRECTXSDK_MAX_D3D)
-- Could NOT find D3DX11EFFECTS (missing: D3DX11EFFECTS_LIB D3DX11EFFECTS_H_PATH)
-- Could NOT find IRRLICHT (missing: IRRLICHT_LIB IRRLICHT_H_PATH)
-- Could NOT find OGRE (missing: OGRE_LIB OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH)
-- Could NOT find DIRECTFB (missing: DIRECTFB_LIB DIRECTFB_H_PATH)
-- Could NOT find OPENGLES (missing: OPENGLES_LIB OPENGLES_H_PATH)
-- Could NOT find XERCESC (missing: XERCESC_LIB XERCESC_H_PATH)
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-- Could NOT find TINYXML (missing: TINYXML_LIB TINYXML_H_PATH)
-- Could NOT find RAPIDXML (missing: RAPIDXML_H_PATH)
-- Could NOT find IL (missing: IL_LIB IL_H_PATH)
-- Could NOT find ILU (missing: ILU_LIB)
-- Could NOT find SILLY (missing: SILLY_LIB SILLY_H_PATH)
-- Could NOT find CORONA (missing: CORONA_LIB CORONA_H_PATH)
-- Could NOT find PVRTOOLS (missing: PVRTOOLS_LIB PVRTOOLS_H_PATH)
-- Could NOT find LUA51 (missing: LUA_LIB LUA_H_PATH)
-- Could NOT find TOLUAPP (missing: TOLUAPP_LIB TOLUAPP_H_PATH)
-- Could NOT find Boost
CMake Error at /usr/share/cmake-2.8/Modules/CPack.cmake:338 (message):
CPack package description file:
"/home/me/myMasterProject/sources/doc/README" could not be
found.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CPack.cmake:342 (cpack_check_file_exists)
CEGUI/CMakeLists.txt:574 (include)
CMake Error at /usr/share/cmake-2.8/Modules/CPack.cmake:338 (message):
CPack license resource file:
"/home/me/myMasterProject/sources/doc/COPYING" could not be
found.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CPack.cmake:343 (cpack_check_file_exists)
CEGUI/CMakeLists.txt:574 (include)
CMAKE_MODULE_PATH =/home/me/myMasterProject/sources/myProject/cmake
CEGUI LIBRARY:
CEGUI OGRE LIBRARY:
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.8)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
As you can notice, when building OGRE everything seems to work well, but after, when CEGUI is building it does not recognize OGRE and related variables. Idem for myProject...
Thanks in advance for your answers,
Cheers
DISCLAIMER: I am almost a newbie with CMAKE... Moreover, I know that similar questions have been already posted here, but I didn't find an answer that works...
Setting the variables for the find script yourself in the master project is a valid approach. It is a bit fragile in the sense that you rely on the respective projects not changing their find scripts, but otherwise this seems perfectly fine.
An alternative could be using CMake's ExternalProject functionality. With this approach, instead of building all dependencies from your master project, they get built during CMake configure time. The advantage here is that dependencies are built as if you would build them directly from the command line, so the effects described in your question are avoided. It also does not depend on any of the dependency's build system internals.

"OpenCV" is considered to be NOT FOUND

Linux Flavor: Debian (Crunch Bang)
Problem Occurred: When attempting to build cvblobs with the following command
cd ~/cvblob
cmake .
Error:
CMake Error at cvBlob/CMakeLists.txt:20 (find_package):
Found package configuration file:
/usr/local/share/OpenCV/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
-- Configuring incomplete, errors occurred!
Well I met a similar problem when I was going with some other open source face detection modules rather than cvblobs.
Actually you will find that before these lines of error-info, there are:
CMake Warning at /usr/local/opencv-2.4.13/cmake/OpenCVConfig.cmake:163 (message):
Found OpenCV Windows Pack but it has not binaries compatible with your configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV library.
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)
CMake Warning at CMakeLists.txt:57 (find_package):
Found package configuration file:
/usr/local/opencv-2.4.13/cmake/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND.
So you may notice that it asks you to manually point out the directory of you build version of OpenCV library.
For me, my source codes are at
/usr/local/opencv-2.4.13/
but I make and install my release build of OpenCV at
/usr/local/opencv-2.4.13/release/
so I use:
cmake -D OpenCV_DIR=/usr/local/opencv-2.4.13/release/ ..
and everything works:)
When I compile a program that use OpenCV lib, vision 2.4.8, occurs the similar error, when I point manually Opencv_DIR path to opencv/build ,visio 3.1.0, error occurred like you.
Then I point Opencv_DIR path to opencv/build whose vision is same to the program used. It works.
One of the reason could be the another OpenCV package in another path, that you had installed before. In my case, I had already installed OpenCV for Python in Anaconda package, and the CMake always wanted to refer me to that package.
I simply added:
set(OpenCV_FOUND 1)
to my CMakeList.txt file, this command simply override the other package you may had installed. The final version of CMakeList file which is working for me would be this:
set( OpenCV_FOUND 1 )
find_package(OpenCV 2.4.13 REQUIRED PATHS "C:/opencv")
set(SOURCE_FILES main.cpp)
add_executable(OpenCV_Test ${SOURCE_FILES})
Note:
1- I am using the CMakeList.txt file for Clion IDE
2- I am using it under windows. Probably you may set the relevant path if you use other OS
3- You need also change the OpenCV version if you use other version