diff options
Diffstat (limited to 'cmake/utils.cmake')
| -rwxr-xr-x | cmake/utils.cmake | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cmake/utils.cmake b/cmake/utils.cmake index a3e60fb5..fc75ef4f 100755 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -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() |
