here`s my CMakeLists.txt
cmake_minimum_required (VERSION 2.8)
project(GL_test_01)
find_package(OpenGL REQUIRED)
find_package(OpenCV REQUIRED)
include_directories({OpenGL_INCLUDE_DIRS})include_directories({OpenCV_INCLUDE_DIRS})
add_executable(GL01_exe v01.cpp)
target_link_libraries(GL01_exe {OpenCV_LIBS})target_link_libraries(GL01_exe {OpenGL_LIBS})
Cmake Find Opengl Windows
but it makes error :
nvidia@tegra-ubuntu:~/SSU_OpenCV/GL test 01/build$ make
Scanning dependencies of target GL01_exe
[ 50%] Building CXX object CMakeFiles/GL01_exe.dir/v01.cpp.o
[100%] Linking CXX executable GL01_exe
CMakeFiles/GL01_exe.dir/v01.cpp.o: In function main': //(every lines with gl~ or glut~ or glu~) CMakeFiles/GL01_exe.dir/v01.cpp.o:v01.cpp:(.text+0x480): more undefined references to
glVertex3f' follow
CMakeFiles/GL01_exe.dir/v01.cpp.o: In function MyWall()': v01.cpp:(.text+0x5c4): undefined reference to
glEnd'
collect2: error: ld returned 1 exit status
CMakeFiles/GL01_exe.dir/build.make:124: recipe for target ‘GL01_exe' failed
make[2]: *** [GL01_exe] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/GL01_exe.dir/all' failed
make[1]: *** [CMakeFiles/GL01_exe.dir/all] Error 2
Makefile:83: recipe for target ‘all' failed
make: *** [all] Error 2
Cmake Could Not Find Opengl
On Windows, we're going to want to make surewe have Visual Studio installed.Visual Studio includes most of the tools we're goingto need for this course with the exception of CMake.CMake, we can download from the cmake.org website.In the resources section, download the Win32 installer.Launch the executable and followinstructions to install CMake.With CMake installed, we. VA-API + OpenGL uses EGL for OpenGL context creation. On X11 QMPlay2 tries to detect if EGL can be used, but the detection can fail. In this case you can try do it manually: export QTXCBGLINTEGRATION=xcbglx and run QMPlay2 from command line.
Cmake Glut
I think I didn`t make CMakeLists.txt well.
Could you find wrong things in my code?