mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 02:53:10 +02:00
Fixing Linux build
This commit is contained in:
parent
537db9acb3
commit
bac3388693
1 changed files with 9 additions and 14 deletions
|
@ -15,22 +15,16 @@ macro(TARGET_GLAD)
|
||||||
find_library(EGL EGL)
|
find_library(EGL EGL)
|
||||||
target_link_libraries(${TARGET_NAME} ${EGL})
|
target_link_libraries(${TARGET_NAME} ${EGL})
|
||||||
else()
|
else()
|
||||||
if (APPLE)
|
if (USE_GLES)
|
||||||
set(GLAD_VER "41")
|
set(GLAD_VER "32es")
|
||||||
else()
|
else()
|
||||||
if (USE_GLES)
|
set(GLAD_VER "45")
|
||||||
set(GLAD_VER "32es")
|
|
||||||
else()
|
|
||||||
set(GLAD_VER "45")
|
|
||||||
add_dependency_external_projects(glad45)
|
|
||||||
endif()
|
|
||||||
if (WIN32)
|
|
||||||
find_package(OpenGL REQUIRED)
|
|
||||||
target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}")
|
|
||||||
# we don't need the include, because we get everything from GLAD
|
|
||||||
#target_include_directories(${TARGET_NAME} PUBLIC ${OPENGL_INCLUDE_DIR})
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
find_package(OpenGL REQUIRED)
|
||||||
|
list(APPEND GLAD_EXTRA_LIBRARIES ${OPENGL_LIBRARY})
|
||||||
|
if (NOT WIN32)
|
||||||
|
list(APPEND GLAD_EXTRA_LIBRARIES dl)
|
||||||
|
endif()
|
||||||
set(GLAD "glad${GLAD_VER}")
|
set(GLAD "glad${GLAD_VER}")
|
||||||
string(TOUPPER ${GLAD} GLAD_UPPER)
|
string(TOUPPER ${GLAD} GLAD_UPPER)
|
||||||
add_dependency_external_projects(${GLAD})
|
add_dependency_external_projects(${GLAD})
|
||||||
|
@ -40,4 +34,5 @@ macro(TARGET_GLAD)
|
||||||
|
|
||||||
target_include_directories(${TARGET_NAME} PUBLIC ${GLAD_INCLUDE_DIRS})
|
target_include_directories(${TARGET_NAME} PUBLIC ${GLAD_INCLUDE_DIRS})
|
||||||
target_link_libraries(${TARGET_NAME} ${GLAD_LIBRARY})
|
target_link_libraries(${TARGET_NAME} ${GLAD_LIBRARY})
|
||||||
|
target_link_libraries(${TARGET_NAME} ${GLAD_EXTRA_LIBRARIES})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
Loading…
Reference in a new issue