VS support

master
Vectozavr 2021-10-23 20:34:22 +07:00
parent edefd731f0
commit cb943db299
1 changed files with 2 additions and 16 deletions

View File

@ -114,7 +114,7 @@ endif()
target_link_libraries(shooter sfml-audio sfml-network sfml-graphics sfml-window sfml-system) target_link_libraries(shooter sfml-audio sfml-network sfml-graphics sfml-window sfml-system)
# OpenGL part # OpenGL part for MacOS
if (APPLE OR UNIX) if (APPLE OR UNIX)
set(GLEW_H /usr/local/Cellar/glew/2.1.0/include/GL) set(GLEW_H /usr/local/Cellar/glew/2.1.0/include/GL)
set(GLFW_H /usr/local/Cellar/glfw/3.2.1/include/GLFW) set(GLFW_H /usr/local/Cellar/glfw/3.2.1/include/GLFW)
@ -126,18 +126,4 @@ if (APPLE OR UNIX)
target_link_libraries(shooter "-framework OpenGL") target_link_libraries(shooter "-framework OpenGL")
target_link_libraries(shooter "-framework GLUT") target_link_libraries(shooter "-framework GLUT")
else()
#OPENGL
find_package(OpenGL REQUIRED)
if (OpenGL_FOUND)
include_directories(${OpenGL_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${OpenGL_LIBRARIES})
target_link_libraries(${PROJECT_NAME} GL)
endif()
find_package(GLEW 2.0 REQUIRED)
if (GLEW_FOUND)
include_directories(${GLEW_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${GLEW_LIBRARIES})
endif()
endif() endif()