mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-10 21:38:15 +00:00
cmake: Fix PLATFORM_WEB build
Did this ever work? Surely, doesn't look like it...
This commit is contained in:
@@ -5,7 +5,11 @@ add_definitions("-DRAYLIB_CMAKE=1")
|
||||
|
||||
# Linking for OS X -framework options
|
||||
# Will do nothing on other OSes
|
||||
if(APPLE)
|
||||
if(${PLATFORM} MATCHES "Android")
|
||||
find_library(OPENGL_LIBRARY OpenGL)
|
||||
set(LIBS_PRIVATE m log android EGL GLESv2 OpenSLES atomic c)
|
||||
elseif(${PLATFORM} MATCHES "Web")
|
||||
elseif(APPLE)
|
||||
find_library(OPENGL_LIBRARY OpenGL)
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
@@ -16,9 +20,6 @@ if(APPLE)
|
||||
${IOKIT_LIBRARY} ${COREFOUNDATION_LIBRARY} ${COREVIDEO_LIBRARY})
|
||||
elseif(WIN32)
|
||||
# no pkg-config --static on Windows yet...
|
||||
elseif(${PLATFORM} MATCHES "Android")
|
||||
find_library(OPENGL_LIBRARY OpenGL)
|
||||
set(LIBS_PRIVATE m log android EGL GLESv2 OpenSLES atomic c)
|
||||
else()
|
||||
find_library(pthread NAMES pthread)
|
||||
find_package(OpenGL QUIET)
|
||||
@@ -87,6 +88,9 @@ function(link_libraries_to_executable executable)
|
||||
# Link raylib
|
||||
if (TARGET raylib_shared)
|
||||
target_link_libraries(${executable} raylib_shared)
|
||||
elseif(${PLATFORM} MATCHES "Web")
|
||||
target_link_libraries(${executable} ${__PKG_CONFIG_LIBS_PRIVATE})
|
||||
target_link_libraries(${executable} raylib)
|
||||
else()
|
||||
target_link_libraries(${executable} raylib ${__PKG_CONFIG_LIBS_PRIVATE})
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user