I'm hitting this is on 64-bit Linux (Ubuntu 12.04).
Simple CMakeLists.txt file:
cmake_minimum_required(VERSION 2.8)
project(Blah)
find_package(OpenGL REQUIRED)
message("OPENGL_INCLUDE_DIRS is ${OPENGL_INCLUDE_DIRS}")
message("OPENGL_LIBRARIES is ${OPENGL_LIBRARIES}")
Doing a regular "cmake .." works, but adding "-G Ninja" fails:
mikesart@mikesart64:~/data/src/bin64/Debug$ cmake .. -G Ninja
-- The C compiler identification is Clang 3.3.0
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- The CXX compiler identification is Clang 3.3.0
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at
/usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97
(message):
Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY)
Call Stack (most recent call first):
/usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291
(_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-2.8/Modules/FindOpenGL.cmake:153
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:10 (find_package)
-- Configuring incomplete, errors occurred!
If I explicitly set CMAKE_LIBRARY_ARCHITECTURE it will succeed:
cmake .. -G Ninja -DCMAKE_LIBRARY_ARCHITECTURE="x86_64-linux-gnu"
If anyone has any suggestions on better ways around this issue, I'd love to
hear them. Thanks much.
-Mike
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake