Fix linking libraries on MacOS

This commit is contained in:
Epicalert 2021-01-11 12:42:47 +08:00
parent 3bc43149c5
commit 17323f0092
No known key found for this signature in database
GPG key ID: CAA46F858D0979BD

View file

@ -1,14 +1,13 @@
cmake_minimum_required( VERSION 3.0 )
project( FaceCam2D VERSION 0.1.0 )
find_package( OpenCV REQUIRED )
find_package( VTK REQUIRED )
find_package( HDF5 REQUIRED )
find_package( OpenGL REQUIRED )
find_package( GLEW REQUIRED )
find_package( glm REQUIRED )
find_package( FreeGLUT REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
include_directories( /usr/local/include )
include_directories( ${PROJECT_SOURCE_DIR}/src )
add_executable( fc2d src/main.cpp src/graphics.cpp src/modelpart.cpp src/cv.cpp )
target_link_libraries( fc2d ${OpenCV_LIBS} -lOpenGL -lglut -lGLEW )
target_link_libraries( fc2d ${OpenCV_LIBS} ${OPENGL_LIBRARIES} glut GLEW)
set( CMAKE_BUILD_TYPE Debug )