CMake: Fix Windows build issues

This commit is contained in:
Vicki Pfau 2019-05-14 16:56:36 -07:00
parent bdc4e2837d
commit 945bc8fffe
1 changed files with 4 additions and 2 deletions

View File

@ -476,12 +476,12 @@ if(NOT BUILD_GLES2)
endif()
if(BUILD_GL)
list(APPEND OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c)
list(APPEND OS_LIB ${OPENGL_LIBRARY})
list(APPEND DEPENDENCY_LIB ${OPENGL_LIBRARY})
include_directories(${OPENGL_INCLUDE_DIR})
endif()
if(BUILD_GLES2)
list(APPEND OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
list(APPEND OS_LIB ${OPENGLES2_LIBRARY})
list(APPEND DEPENDENCY_LIB ${OPENGLES2_LIBRARY})
include_directories(${OPENGLES2_INCLUDE_DIR})
endif()
if(BUILD_GLES3)
@ -737,11 +737,13 @@ if (USE_LZMA)
endif()
if(USE_EPOXY)
list(APPEND OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
add_definitions(-DBUILD_GL -DBUILD_GLES2)
list(APPEND FEATURES EPOXY)
include_directories(AFTER ${EPOXY_INCLUDE_DIRS})
link_directories(${EPOXY_LIBRARY_DIRS})
set(OPENGLES2_LIBRARY ${EPOXY_LIBRARIES})
list(APPEND DEPENDENCY_LIB ${EPOXY_LIBRARIES})
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libepoxy0")
elseif(BUILD_GL)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libgl1|libgles2")