mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-03 23:46:08 +00:00
cmake: Fix linking against system GLEW
This commit is contained in:
parent
c502692490
commit
e0cce7602b
@ -960,8 +960,8 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
target_link_libraries(native ${LIBZIP_LIBRARY} ${ZLIB_LIBRARY} ${PNG_LIBRARY} rg_etc1 vjson udis86 ${RT_LIB} ${nativeExtraLibs} ${ATOMIC_LIB})
|
||||
if(TARGET glew)
|
||||
target_link_libraries(native glew)
|
||||
if(TARGET Ext::GLEW)
|
||||
target_link_libraries(native Ext::GLEW)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
|
@ -1,5 +1,9 @@
|
||||
#find_package(GLEW)
|
||||
if(NOT GLEW_FOUND)
|
||||
find_package(GLEW)
|
||||
if(GLEW_FOUND)
|
||||
add_library(system_glew INTERFACE)
|
||||
add_library(Ext::GLEW ALIAS system_glew)
|
||||
target_link_libraries(system_glew INTERFACE GLEW::GLEW)
|
||||
else()
|
||||
find_package(OpenGL REQUIRED)
|
||||
add_library(glew STATIC
|
||||
GL/glew.h
|
||||
@ -7,6 +11,7 @@ if(NOT GLEW_FOUND)
|
||||
GL/wglew.h
|
||||
glew.c
|
||||
)
|
||||
add_library(Ext::GLEW ALIAS glew)
|
||||
target_link_libraries(glew PUBLIC ${OPENGL_LIBRARIES})
|
||||
target_compile_definitions(glew PUBLIC GLEW_STATIC)
|
||||
target_include_directories(glew PUBLIC . ${OPENGL_INCLUDE_DIR})
|
||||
|
Loading…
x
Reference in New Issue
Block a user