More windows build fixes

This commit is contained in:
Dawid Pietrykowski 2023-06-05 19:43:23 +02:00
parent b7a9ac3e93
commit 90268c3e43

View File

@ -90,6 +90,7 @@ find_package(GLEW REQUIRED)
if(GLEW_FOUND)
set(GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIRS})
message(STATUS "GLEW_LIBRARIES: ${GLEW_LIBRARIES}")
get_filename_component(GLEW_LIBRARIES ${GLEW_LIBRARIES} DIRECTORY)
message(STATUS "GLEW_INCLUDE_DIR: ${GLEW_INCLUDE_DIR}")
message(STATUS "GLEW_LIBRARIES: ${GLEW_LIBRARIES}")
@ -119,8 +120,12 @@ ${OPENGL_INCLUDE_DIR}
${Stb_INCLUDE_DIR}
${GLEW_INCLUDE_DIR})
target_link_directories(${PROJECT_NAME} PUBLIC ${GLFW_LIB_DIR} ${GLEW_LIBRARIES})
target_link_libraries(${PROJECT_NAME} glfw OpenGL::GL GLEW::GLEW)
if(WIN32)
target_link_libraries(${PROJECT_NAME} glfw GLEW::GLEW ComputeEngine)
else()
target_link_libraries(${PROJECT_NAME} glfw OpenGL::GL GLEW::GLEW ComputeEngine)
endif()
# Header files
file(COPY src/ComputeEngine.h DESTINATION ${CMAKE_BINARY_DIR}/include)