Commit 7781530a authored by Yung-Lin Huang (Cary)'s avatar Yung-Lin Huang (Cary)

cmake moved glut and glew for Linux only

parent ca5a8548
# for MacOS
if(APPLE)
option(HAVE_RETINA "Set TRUE if the display is retina" TRUE)
if(HAVE_RETINA)
......@@ -5,12 +6,16 @@ if(APPLE)
endif(HAVE_RETINA)
endif(APPLE)
# for Linux
if(UNIX AND NOT APPLE)
find_package(GLUT REQUIRED)
find_package(GLEW REQUIRED)
endif(UNIX AND NOT APPLE)
find_package(Threads REQUIRED)
find_package(PNG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
find_package(GLEW REQUIRED)
find_package(OpenMP)
# FLTK
......@@ -140,10 +145,16 @@ target_link_libraries(meshalyzer PRIVATE
PNG::PNG
ZLIB::ZLIB
OpenGL::GL
GLUT::GLUT
GLEW::GLEW
)
if(GLUT_FOUND)
target_link_libraries(meshalyzer PRIVATE GLUT::GLUT)
endif(GLUT_FOUND)
if(GLEW_FOUND)
target_link_libraries(meshalyzer PRIVATE GLEW::GLEW)
endif(GLEW_FOUND)
if(OpenMP_CXX_FOUND)
target_link_libraries(meshalyzer PRIVATE OpenMP::OpenMP_CXX)
endif(OpenMP_CXX_FOUND)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment