diff options
author | LucaSas <sas.luca.alex@gmail.com> | 2021-11-04 16:15:47 +0200 |
---|---|---|
committer | LucaSas <sas.luca.alex@gmail.com> | 2021-11-04 16:15:47 +0200 |
commit | 4e34ae85948438f726a911c9dbb8616968a378a5 (patch) | |
tree | 07b470559a9f973bcf695938606c7c28cd5e161a /libs/raylib/cmake/GlfwImport.cmake | |
parent | d96b4ebce5ee6245fa80d27d41b67aa56555c912 (diff) | |
parent | d227d3c609c4b95fa9c8a0ba5a10e7c47bcb984c (diff) | |
download | gamejam-slgj-2024-4e34ae85948438f726a911c9dbb8616968a378a5.tar.gz gamejam-slgj-2024-4e34ae85948438f726a911c9dbb8616968a378a5.tar.bz2 gamejam-slgj-2024-4e34ae85948438f726a911c9dbb8616968a378a5.zip |
Merge remote-tracking branch 'origin/master'
# Conflicts:
# README.md
# libs/raylib/.gitignore
# libs/raylib/BINDINGS.md
# libs/raylib/CHANGELOG
# libs/raylib/CMakeLists.txt
# libs/raylib/CONTRIBUTING.md
# libs/raylib/HISTORY.md
# libs/raylib/LICENSE
# libs/raylib/README.md
# libs/raylib/ROADMAP.md
# libs/raylib/SPONSORS.md
# libs/raylib/raylib.pc.in
# libs/raylib/src/CMakeLists.txt
# libs/raylib/src/Makefile
# libs/raylib/src/camera.h
# libs/raylib/src/config.h
# libs/raylib/src/core.c
# libs/raylib/src/easings.h
# libs/raylib/src/external/cgltf.h
# libs/raylib/src/external/dr_flac.h
# libs/raylib/src/external/dr_mp3.h
# libs/raylib/src/external/dr_wav.h
# libs/raylib/src/external/glfw/CMake/glfw3.pc.in
# libs/raylib/src/external/glfw/CMake/glfw3Config.cmake.in
# libs/raylib/src/external/glfw/CMakeLists.txt
# libs/raylib/src/external/glfw/README.md
# libs/raylib/src/external/glfw/include/GLFW/glfw3.h
# libs/raylib/src/external/glfw/src/cocoa_init.m
# libs/raylib/src/external/glfw/src/cocoa_joystick.h
# libs/raylib/src/external/glfw/src/cocoa_joystick.m
# libs/raylib/src/external/glfw/src/cocoa_monitor.m
# libs/raylib/src/external/glfw/src/cocoa_platform.h
# libs/raylib/src/external/glfw/src/cocoa_window.m
# libs/raylib/src/external/glfw/src/egl_context.c
# libs/raylib/src/external/glfw/src/egl_context.h
# libs/raylib/src/external/glfw/src/glfw_config.h.in
# libs/raylib/src/external/glfw/src/init.c
# libs/raylib/src/external/glfw/src/input.c
# libs/raylib/src/external/glfw/src/internal.h
# libs/raylib/src/external/glfw/src/linux_joystick.c
# libs/raylib/src/external/glfw/src/linux_joystick.h
# libs/raylib/src/external/glfw/src/mappings.h
# libs/raylib/src/external/glfw/src/nsgl_context.m
# libs/raylib/src/external/glfw/src/null_init.c
# libs/raylib/src/external/glfw/src/null_joystick.c
# libs/raylib/src/external/glfw/src/null_monitor.c
# libs/raylib/src/external/glfw/src/null_platform.h
# libs/raylib/src/external/glfw/src/null_window.c
# libs/raylib/src/external/glfw/src/osmesa_context.h
# libs/raylib/src/external/glfw/src/wgl_context.h
# libs/raylib/src/external/glfw/src/win32_init.c
# libs/raylib/src/external/glfw/src/win32_joystick.c
# libs/raylib/src/external/glfw/src/win32_joystick.h
# libs/raylib/src/external/glfw/src/win32_monitor.c
# libs/raylib/src/external/glfw/src/win32_platform.h
# libs/raylib/src/external/glfw/src/win32_window.c
# libs/raylib/src/external/glfw/src/window.c
# libs/raylib/src/external/glfw/src/wl_init.c
# libs/raylib/src/external/glfw/src/wl_monitor.c
# libs/raylib/src/external/glfw/src/wl_platform.h
# libs/raylib/src/external/glfw/src/wl_window.c
# libs/raylib/src/external/glfw/src/x11_init.c
# libs/raylib/src/external/glfw/src/x11_monitor.c
# libs/raylib/src/external/glfw/src/x11_platform.h
# libs/raylib/src/external/glfw/src/x11_window.c
# libs/raylib/src/external/jar_xm.h
# libs/raylib/src/external/miniaudio.h
# libs/raylib/src/external/stb_image.h
# libs/raylib/src/external/stb_image_write.h
# libs/raylib/src/external/stb_vorbis.h
# libs/raylib/src/external/tinyobj_loader_c.h
# libs/raylib/src/gestures.h
# libs/raylib/src/models.c
# libs/raylib/src/physac.h
# libs/raylib/src/raudio.c
# libs/raylib/src/raudio.h
# libs/raylib/src/raylib.dll.rc
# libs/raylib/src/raylib.dll.rc.data
# libs/raylib/src/raylib.h
# libs/raylib/src/raylib.rc
# libs/raylib/src/raylib.rc.data
# libs/raylib/src/raymath.h
# libs/raylib/src/rglfw.c
# libs/raylib/src/rlgl.h
# libs/raylib/src/rmem.h
# libs/raylib/src/rnet.h
# libs/raylib/src/shapes.c
# libs/raylib/src/text.c
# libs/raylib/src/textures.c
# libs/raylib/src/utils.c
# libs/raylib/src/utils.h
Diffstat (limited to 'libs/raylib/cmake/GlfwImport.cmake')
-rw-r--r-- | libs/raylib/cmake/GlfwImport.cmake | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libs/raylib/cmake/GlfwImport.cmake b/libs/raylib/cmake/GlfwImport.cmake new file mode 100644 index 0000000..b740884 --- /dev/null +++ b/libs/raylib/cmake/GlfwImport.cmake @@ -0,0 +1,34 @@ + +if(USE_EXTERNAL_GLFW STREQUAL "ON") + find_package(glfw3 3.2.1 REQUIRED) +elseif(USE_EXTERNAL_GLFW STREQUAL "IF_POSSIBLE") + find_package(glfw3 3.2.1 QUIET) +endif() +if (glfw3_FOUND) + set(LIBS_PRIVATE ${LIBS_PRIVATE} glfw) +endif() + +# Explicitly check against "ON", because USE_EXTERNAL_GLFW is a tristate option +# Also adding only on desktop (web also uses glfw but it is more limited and is added using an emcc linker flag) +if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MATCHES "Desktop") + MESSAGE(STATUS "Using raylib's GLFW") + set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) + set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) + set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) + set(GLFW_INSTALL OFF CACHE BOOL "" FORCE) + set(GLFW_USE_WAYLAND ${USE_WAYLAND} CACHE BOOL "" FORCE) + + set(WAS_SHARED ${BUILD_SHARED_LIBS}) + set(BUILD_SHARED_LIBS OFF CACHE BOOL " " FORCE) + + add_subdirectory(external/glfw) + + set(BUILD_SHARED_LIBS ${WAS_SHARED} CACHE BOOL " " FORCE) + unset(WAS_SHARED) + + list(APPEND raylib_sources $<TARGET_OBJECTS:glfw_objlib>) + include_directories(BEFORE SYSTEM external/glfw/include) +else() + MESSAGE(STATUS "Using external GLFW") + set(GLFW_PKG_DEPS glfw3) +endif() |