koffi 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog.md +6 -0
- package/build/qemu/2.1.2/koffi_darwin_arm64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_arm32hf.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_riscv64hf64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_openbsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_openbsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_win32_arm64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_win32_x64.tar.gz +0 -0
- package/doc/templates/badges.html +3 -0
- package/package.json +2 -2
- package/src/abi_arm64.cc +35 -1
- package/src/abi_x64_win.cc +2 -8
- package/src/abi_x86.cc +1 -7
- package/src/ffi.hh +1 -1
- package/src/util.hh +6 -0
- package/test/raylib.js +37 -5
- package/vendor/libcc/libcc.cc +430 -196
- package/vendor/libcc/libcc.hh +1417 -1283
- package/vendor/raylib/BINDINGS.md +87 -70
- package/vendor/raylib/CHANGELOG +263 -50
- package/vendor/raylib/CMakeLists.txt +12 -0
- package/vendor/raylib/CMakeOptions.txt +8 -1
- package/vendor/raylib/CONVENTIONS.md +2 -3
- package/vendor/raylib/FAQ.md +137 -0
- package/vendor/raylib/HISTORY.md +62 -29
- package/vendor/raylib/LICENSE +1 -1
- package/vendor/raylib/README.md +22 -17
- package/vendor/raylib/ROADMAP.md +8 -7
- package/vendor/raylib/cmake/CompileDefinitions.cmake +19 -15
- package/vendor/raylib/cmake/GlfwImport.cmake +2 -0
- package/vendor/raylib/cmake/LibraryConfigurations.cmake +22 -16
- package/vendor/raylib/cmake/raylib-config.cmake +52 -49
- package/vendor/raylib/examples/CMakeLists.txt +14 -9
- package/vendor/raylib/examples/Makefile +112 -125
- package/vendor/raylib/examples/Makefile.Android +1 -1
- package/vendor/raylib/examples/Makefile.Web +145 -158
- package/vendor/raylib/examples/README.md +141 -141
- package/vendor/raylib/examples/audio/audio_module_playing.c +9 -4
- package/vendor/raylib/examples/audio/audio_multichannel_sound.c +8 -3
- package/vendor/raylib/examples/audio/audio_music_stream.c +16 -11
- package/vendor/raylib/examples/audio/audio_raw_stream.c +57 -9
- package/vendor/raylib/examples/audio/audio_sound_loading.c +8 -3
- package/vendor/raylib/examples/audio/audio_stream_effects.c +179 -0
- package/vendor/raylib/examples/audio/audio_stream_effects.png +0 -0
- package/vendor/raylib/examples/build.zig +17 -6
- package/vendor/raylib/examples/core/core_2d_camera.c +8 -4
- package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.c +105 -0
- package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.png +0 -0
- package/vendor/raylib/examples/core/core_2d_camera_platformer.c +11 -6
- package/vendor/raylib/examples/core/core_3d_camera_first_person.c +9 -4
- package/vendor/raylib/examples/core/core_3d_camera_free.c +9 -4
- package/vendor/raylib/examples/core/core_3d_camera_mode.c +8 -3
- package/vendor/raylib/examples/core/core_3d_picking.c +9 -4
- package/vendor/raylib/examples/core/core_basic_screen_manager.c +9 -7
- package/vendor/raylib/examples/core/core_basic_window.c +8 -3
- package/vendor/raylib/examples/core/core_basic_window_web.c +13 -11
- package/vendor/raylib/examples/core/core_custom_frame_control.c +9 -4
- package/vendor/raylib/examples/core/core_custom_logging.c +12 -8
- package/vendor/raylib/examples/core/core_drop_files.c +20 -12
- package/vendor/raylib/examples/core/core_input_gamepad.c +20 -15
- package/vendor/raylib/examples/core/core_input_gestures.c +19 -15
- package/vendor/raylib/examples/core/core_input_keys.c +8 -3
- package/vendor/raylib/examples/core/core_input_mouse.c +8 -3
- package/vendor/raylib/examples/core/core_input_mouse_wheel.c +8 -3
- package/vendor/raylib/examples/core/core_input_multitouch.c +8 -3
- package/vendor/raylib/examples/core/core_loading_thread.c +10 -6
- package/vendor/raylib/examples/core/core_random_values.c +8 -3
- package/vendor/raylib/examples/core/core_scissor_test.c +8 -3
- package/vendor/raylib/examples/core/core_smooth_pixelperfect.c +9 -4
- package/vendor/raylib/examples/core/core_split_screen.c +8 -3
- package/vendor/raylib/examples/core/core_storage_values.c +109 -3
- package/vendor/raylib/examples/core/core_vr_simulator.c +15 -7
- package/vendor/raylib/examples/core/core_window_flags.c +8 -3
- package/vendor/raylib/examples/core/core_window_letterbox.c +13 -18
- package/vendor/raylib/examples/core/core_window_should_close.c +77 -0
- package/vendor/raylib/examples/core/core_window_should_close.png +0 -0
- package/vendor/raylib/examples/core/core_world_screen.c +9 -4
- package/vendor/raylib/examples/examples_template.c +8 -3
- package/vendor/raylib/examples/models/models_animation.c +11 -7
- package/vendor/raylib/examples/models/models_billboard.c +9 -4
- package/vendor/raylib/examples/models/models_box_collisions.c +8 -3
- package/vendor/raylib/examples/models/models_cubicmap.c +9 -4
- package/vendor/raylib/examples/models/models_first_person_maze.c +9 -4
- package/vendor/raylib/examples/models/models_geometric_shapes.c +8 -3
- package/vendor/raylib/examples/models/models_heightmap.c +9 -4
- package/vendor/raylib/examples/models/models_loading.c +21 -17
- package/vendor/raylib/examples/models/models_loading_gltf.c +15 -41
- package/vendor/raylib/examples/models/models_loading_vox.c +9 -4
- package/vendor/raylib/examples/models/models_mesh_generation.c +71 -58
- package/vendor/raylib/examples/models/models_mesh_picking.c +25 -7
- package/vendor/raylib/examples/models/models_orthographic_projection.c +8 -5
- package/vendor/raylib/examples/models/models_rlgl_solar_system.c +6 -4
- package/vendor/raylib/examples/models/models_skybox.c +16 -12
- package/vendor/raylib/examples/models/models_waving_cubes.c +9 -4
- package/vendor/raylib/examples/models/models_yaw_pitch_roll.c +12 -7
- package/vendor/raylib/examples/models/resources/LICENSE.md +9 -10
- package/vendor/raylib/examples/models/resources/models/gltf/LICENSE +2 -23
- package/vendor/raylib/examples/models/resources/models/gltf/{raylib_32x32.glb → raylib_logo_3d.glb} +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/robot.blend +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/robot.glb +0 -0
- package/vendor/raylib/examples/others/easings_testbed.c +10 -8
- package/vendor/raylib/examples/others/easings_testbed.png +0 -0
- package/vendor/raylib/examples/others/embedded_files_loading.c +10 -5
- package/vendor/raylib/examples/others/embedded_files_loading.png +0 -0
- package/vendor/raylib/examples/others/raylib_opengl_interop.c +10 -6
- package/vendor/raylib/{src/extras/easings.h → examples/others/reasings.h} +38 -38
- package/vendor/raylib/examples/others/rlgl_compute_shader.c +21 -20
- package/vendor/raylib/examples/others/rlgl_compute_shader.png +0 -0
- package/vendor/raylib/examples/others/rlgl_standalone.c +4 -4
- package/vendor/raylib/examples/others/rlgl_standalone.png +0 -0
- package/vendor/raylib/examples/raylib_compile_execute.bat +2 -2
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/lighting.fs +1 -1
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/{base_lighting_instanced.vs → lighting_instancing.vs} +2 -2
- package/vendor/raylib/examples/shaders/rlights.h +14 -27
- package/vendor/raylib/examples/shaders/shaders_basic_lighting.c +24 -26
- package/vendor/raylib/examples/shaders/shaders_custom_uniform.c +10 -5
- package/vendor/raylib/examples/shaders/shaders_eratosthenes.c +13 -8
- package/vendor/raylib/examples/shaders/shaders_fog.c +8 -12
- package/vendor/raylib/examples/shaders/shaders_hot_reloading.c +10 -5
- package/vendor/raylib/examples/shaders/shaders_julia_set.c +9 -4
- package/vendor/raylib/examples/shaders/shaders_mesh_instancing.c +45 -119
- package/vendor/raylib/examples/shaders/shaders_model_shader.c +10 -5
- package/vendor/raylib/examples/shaders/shaders_multi_sample2d.c +8 -3
- package/vendor/raylib/examples/shaders/shaders_palette_switch.c +8 -3
- package/vendor/raylib/examples/shaders/shaders_postprocessing.c +9 -4
- package/vendor/raylib/examples/shaders/shaders_raymarching.c +14 -11
- package/vendor/raylib/examples/shaders/shaders_shapes_textures.c +8 -3
- package/vendor/raylib/examples/shaders/shaders_simple_mask.c +10 -5
- package/vendor/raylib/examples/shaders/shaders_spotlight.c +10 -6
- package/vendor/raylib/examples/shaders/shaders_texture_drawing.c +9 -4
- package/vendor/raylib/examples/shaders/shaders_texture_outline.c +8 -3
- package/vendor/raylib/examples/shaders/shaders_texture_waves.c +8 -3
- package/vendor/raylib/{src/extras → examples/shapes}/raygui.h +1290 -1141
- package/vendor/raylib/examples/{others/easings.h → shapes/reasings.h} +40 -40
- package/vendor/raylib/examples/shapes/shapes_basic_shapes.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_bouncing_ball.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_collision_area.c +10 -4
- package/vendor/raylib/examples/shapes/shapes_colors_palette.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_draw_ring.c +10 -6
- package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_easings_box_anim.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_following_eyes.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_lines_bezier.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_logo_raylib.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.c +14 -5
- package/vendor/raylib/examples/shapes/shapes_top_down_lights.c +355 -0
- package/vendor/raylib/examples/shapes/shapes_top_down_lights.png +0 -0
- package/vendor/raylib/examples/text/resources/DotGothic16-Regular.ttf +0 -0
- package/vendor/raylib/examples/text/resources/DotGothic16-Regular_OFL.txt +93 -0
- package/vendor/raylib/examples/text/resources/LICENSE.md +1 -1
- package/vendor/raylib/examples/text/text_codepoints_loading.c +138 -0
- package/vendor/raylib/examples/text/text_codepoints_loading.png +0 -0
- package/vendor/raylib/examples/text/text_draw_3d.c +42 -33
- package/vendor/raylib/examples/text/text_font_filters.c +14 -11
- package/vendor/raylib/examples/text/text_font_loading.c +9 -4
- package/vendor/raylib/examples/text/text_font_sdf.c +9 -4
- package/vendor/raylib/examples/text/text_font_spritefont.c +12 -6
- package/vendor/raylib/examples/text/text_format_text.c +8 -3
- package/vendor/raylib/examples/text/text_input_box.c +8 -3
- package/vendor/raylib/examples/text/text_raylib_fonts.c +9 -4
- package/vendor/raylib/examples/text/text_rectangle_bounds.c +9 -5
- package/vendor/raylib/examples/text/text_unicode.c +9 -7
- package/vendor/raylib/examples/text/text_writing_anim.c +8 -3
- package/vendor/raylib/examples/textures/resources/scarfy_run.gif +0 -0
- package/vendor/raylib/examples/textures/textures_background_scrolling.c +8 -3
- package/vendor/raylib/examples/textures/textures_blend_modes.c +8 -3
- package/vendor/raylib/examples/textures/textures_bunnymark.c +8 -3
- package/vendor/raylib/examples/textures/textures_draw_tiled.c +14 -10
- package/vendor/raylib/examples/textures/textures_fog_of_war.c +154 -0
- package/vendor/raylib/examples/textures/textures_fog_of_war.png +0 -0
- package/vendor/raylib/examples/textures/textures_gif_player.c +121 -0
- package/vendor/raylib/examples/textures/textures_gif_player.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_drawing.c +8 -3
- package/vendor/raylib/examples/textures/textures_image_generation.c +8 -3
- package/vendor/raylib/examples/textures/textures_image_loading.c +8 -3
- package/vendor/raylib/examples/textures/textures_image_processing.c +8 -3
- package/vendor/raylib/examples/textures/textures_image_text.c +8 -3
- package/vendor/raylib/examples/textures/textures_logo_raylib.c +8 -3
- package/vendor/raylib/examples/textures/textures_mouse_painting.c +9 -4
- package/vendor/raylib/examples/textures/textures_npatch_drawing.c +8 -3
- package/vendor/raylib/examples/textures/textures_particles_blending.c +8 -3
- package/vendor/raylib/examples/textures/textures_polygon.c +9 -5
- package/vendor/raylib/examples/textures/textures_raw_data.c +8 -3
- package/vendor/raylib/examples/textures/{textures_rectangle.c → textures_sprite_anim.c} +11 -5
- package/vendor/raylib/examples/textures/{textures_rectangle.png → textures_sprite_anim.png} +0 -0
- package/vendor/raylib/examples/textures/textures_sprite_button.c +8 -3
- package/vendor/raylib/examples/textures/textures_sprite_explosion.c +8 -3
- package/vendor/raylib/examples/textures/textures_srcrec_dstrec.c +8 -3
- package/vendor/raylib/examples/textures/textures_to_image.c +8 -3
- package/vendor/raylib/parser/LICENSE +1 -1
- package/vendor/raylib/parser/Makefile +28 -0
- package/vendor/raylib/parser/README.md +49 -5
- package/vendor/raylib/parser/output/raylib_api.json +10717 -0
- package/vendor/raylib/parser/output/raylib_api.lua +7435 -0
- package/vendor/raylib/parser/{raylib_api.txt → output/raylib_api.txt} +1371 -824
- package/vendor/raylib/parser/{raylib_api.xml → output/raylib_api.xml} +827 -595
- package/vendor/raylib/parser/raylib_parser.c +1174 -196
- package/vendor/raylib/projects/4coder/Makefile +2 -4
- package/vendor/raylib/projects/4coder/main.c +0 -1
- package/vendor/raylib/projects/CMake/CMakeLists.txt +13 -16
- package/vendor/raylib/projects/CMake/README.md +27 -0
- package/vendor/raylib/projects/CMake/core_basic_window.c +52 -31
- package/vendor/raylib/projects/CodeBlocks/README.md +4 -4
- package/vendor/raylib/projects/Geany/core_basic_window.c +1 -1
- package/vendor/raylib/projects/Notepad++/c_raylib.xml +168 -128
- package/vendor/raylib/projects/Notepad++/npes_saved_tcc.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_w64devkit.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_zig.txt +0 -0
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +168 -84
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +67 -51
- package/vendor/raylib/projects/README.md +1 -1
- package/vendor/raylib/projects/VSCode/.vscode/c_cpp_properties.json +1 -1
- package/vendor/raylib/projects/VSCode/Makefile +8 -11
- package/vendor/raylib/projects/VSCode/main.c +53 -26
- package/vendor/raylib/projects/VSCode/resources/LICENSE +1 -0
- package/vendor/raylib/projects/scripts/build-linux.sh +6 -6
- package/vendor/raylib/projects/scripts/build-osx.sh +6 -6
- package/vendor/raylib/projects/scripts/build-rpi.sh +6 -6
- package/vendor/raylib/projects/scripts/build-windows.bat +2 -2
- package/vendor/raylib/src/CMakeLists.txt +6 -7
- package/vendor/raylib/src/Makefile +209 -103
- package/vendor/raylib/src/build.zig +56 -20
- package/vendor/raylib/src/config.h +32 -27
- package/vendor/raylib/src/external/cgltf.h +342 -104
- package/vendor/raylib/src/external/dr_wav.h +487 -225
- package/vendor/raylib/src/external/glfw/src/posix_time.c +1 -3
- package/vendor/raylib/src/external/glfw/src/wl_init.c +1 -3
- package/vendor/raylib/src/external/jar_xm.h +2 -1
- package/vendor/raylib/src/external/miniaudio.h +62251 -42061
- package/vendor/raylib/src/external/qoi.h +671 -0
- package/vendor/raylib/src/external/stb_vorbis.h +1 -1
- package/vendor/raylib/src/external/vox_loader.h +30 -25
- package/vendor/raylib/src/minshell.html +82 -0
- package/vendor/raylib/src/raudio.c +359 -201
- package/vendor/raylib/src/raylib.dll.rc +5 -5
- package/vendor/raylib/src/raylib.dll.rc.data +0 -0
- package/vendor/raylib/src/raylib.h +95 -63
- package/vendor/raylib/src/raylib.rc +5 -5
- package/vendor/raylib/src/raylib.rc.data +0 -0
- package/vendor/raylib/src/raymath.h +391 -133
- package/vendor/raylib/src/rcamera.h +32 -41
- package/vendor/raylib/src/rcore.c +775 -471
- package/vendor/raylib/src/rgestures.h +5 -5
- package/vendor/raylib/src/rglfw.c +3 -3
- package/vendor/raylib/src/rlgl.h +184 -144
- package/vendor/raylib/src/rmodels.c +207 -144
- package/vendor/raylib/src/rshapes.c +105 -47
- package/vendor/raylib/src/rtext.c +255 -38
- package/vendor/raylib/src/rtextures.c +167 -71
- package/vendor/raylib/src/shell.html +63 -63
- package/vendor/raylib/src/utils.c +49 -3
- package/vendor/raylib/src/utils.h +3 -3
- package/build/qemu/2.1.1/koffi_darwin_arm64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_arm32hf.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_riscv64hf64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_openbsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_openbsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_win32_arm64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_win32_x64.tar.gz +0 -0
- package/vendor/raylib/CONTRIBUTORS.md +0 -63
- package/vendor/raylib/SPONSORS.md +0 -68
- package/vendor/raylib/examples/core/core_quat_conversion.c +0 -132
- package/vendor/raylib/examples/core/core_quat_conversion.png +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/AnimatedMorphCube.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/AnimatedTriangle.gltf +0 -118
- package/vendor/raylib/examples/models/resources/models/gltf/BoxAnimated.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/girl.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/rigged_figure.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/vertex_colored_object.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/vertex_colored_object.iqm +0 -0
- package/vendor/raylib/examples/models/rlights.h +0 -183
- package/vendor/raylib/examples/others/raudio_standalone.c +0 -152
- package/vendor/raylib/examples/others/resources/audio/country.mp3 +0 -0
- package/vendor/raylib/examples/others/resources/audio/target.ogg +0 -0
- package/vendor/raylib/examples/others/resources/audio/weird.wav +0 -0
- package/vendor/raylib/examples/physics/physics_demo.c +0 -128
- package/vendor/raylib/examples/physics/physics_demo.png +0 -0
- package/vendor/raylib/examples/physics/physics_friction.c +0 -142
- package/vendor/raylib/examples/physics/physics_friction.png +0 -0
- package/vendor/raylib/examples/physics/physics_movement.c +0 -128
- package/vendor/raylib/examples/physics/physics_movement.png +0 -0
- package/vendor/raylib/examples/physics/physics_restitution.c +0 -129
- package/vendor/raylib/examples/physics/physics_restitution.png +0 -0
- package/vendor/raylib/examples/physics/physics_shatter.c +0 -111
- package/vendor/raylib/examples/physics/physics_shatter.png +0 -0
- package/vendor/raylib/parser/raylib_api.json +0 -6668
- package/vendor/raylib/projects/VS2019/raylib/raylib.rc +0 -0
- package/vendor/raylib/projects/VS2019/raylib/resource.h +0 -14
- package/vendor/raylib/src/extras/physac.h +0 -1977
- package/vendor/raylib/src/extras/rmem.h +0 -751
- package/vendor/raylib/src/raudio.h +0 -198
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
if (${PLATFORM} MATCHES "Desktop")
|
|
2
2
|
set(PLATFORM_CPP "PLATFORM_DESKTOP")
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
if (APPLE)
|
|
5
5
|
# Need to force OpenGL 3.3 on OS X
|
|
6
6
|
# See: https://github.com/raysan5/raylib/issues/341
|
|
@@ -22,12 +22,16 @@ if (${PLATFORM} MATCHES "Desktop")
|
|
|
22
22
|
if ("${OPENGL_LIBRARIES}" STREQUAL "")
|
|
23
23
|
set(OPENGL_LIBRARIES "GL")
|
|
24
24
|
endif ()
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD")
|
|
27
27
|
find_library(OSS_LIBRARY ossaudio)
|
|
28
28
|
endif ()
|
|
29
|
-
|
|
30
|
-
set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
|
29
|
+
|
|
30
|
+
set(LIBS_PRIVATE m atomic pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
|
31
|
+
|
|
32
|
+
if (USE_AUDIO)
|
|
33
|
+
set(LIBS_PRIVATE ${LIBS_PRIVATE} dl)
|
|
34
|
+
endif ()
|
|
31
35
|
endif ()
|
|
32
36
|
|
|
33
37
|
elseif (${PLATFORM} MATCHES "Web")
|
|
@@ -40,20 +44,20 @@ elseif (${PLATFORM} MATCHES "Android")
|
|
|
40
44
|
set(PLATFORM_CPP "PLATFORM_ANDROID")
|
|
41
45
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
|
42
46
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
43
|
-
|
|
47
|
+
list(APPEND raylib_sources ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c)
|
|
44
48
|
add_definitions(-DANDROID -D__ANDROID_API__=21)
|
|
45
|
-
include_directories(
|
|
46
|
-
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -
|
|
47
|
-
|
|
49
|
+
include_directories(${ANDROID_NDK}/sources/android/native_app_glue)
|
|
50
|
+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -u ANativeActivity_onCreate -Wl,-undefined,dynamic_lookup")
|
|
51
|
+
|
|
48
52
|
find_library(OPENGL_LIBRARY OpenGL)
|
|
49
53
|
set(LIBS_PRIVATE m log android EGL GLESv2 OpenSLES atomic c)
|
|
50
54
|
|
|
51
55
|
elseif (${PLATFORM} MATCHES "Raspberry Pi")
|
|
52
56
|
set(PLATFORM_CPP "PLATFORM_RPI")
|
|
53
57
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
|
54
|
-
|
|
58
|
+
|
|
55
59
|
add_definitions(-D_DEFAULT_SOURCE)
|
|
56
|
-
|
|
60
|
+
|
|
57
61
|
find_library(GLESV2 brcmGLESv2 HINTS /opt/vc/lib)
|
|
58
62
|
find_library(EGL brcmEGL HINTS /opt/vc/lib)
|
|
59
63
|
find_library(BCMHOST bcm_host HINTS /opt/vc/lib)
|
|
@@ -61,29 +65,31 @@ elseif (${PLATFORM} MATCHES "Raspberry Pi")
|
|
|
61
65
|
link_directories(/opt/vc/lib)
|
|
62
66
|
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${BCMHOST} pthread rt m dl)
|
|
63
67
|
|
|
64
|
-
elseif (${PLATFORM} MATCHES "DRM")
|
|
68
|
+
elseif ("${PLATFORM}" MATCHES "DRM")
|
|
65
69
|
set(PLATFORM_CPP "PLATFORM_DRM")
|
|
66
70
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
|
67
|
-
|
|
71
|
+
|
|
68
72
|
add_definitions(-D_DEFAULT_SOURCE)
|
|
69
73
|
add_definitions(-DEGL_NO_X11)
|
|
70
74
|
add_definitions(-DPLATFORM_DRM)
|
|
71
|
-
|
|
75
|
+
|
|
72
76
|
find_library(GLESV2 GLESv2)
|
|
73
77
|
find_library(EGL EGL)
|
|
74
78
|
find_library(DRM drm)
|
|
75
79
|
find_library(GBM gbm)
|
|
76
|
-
|
|
80
|
+
|
|
77
81
|
if (NOT CMAKE_CROSSCOMPILING)
|
|
78
82
|
include_directories(/usr/include/libdrm)
|
|
79
83
|
endif ()
|
|
80
|
-
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} pthread m dl)
|
|
84
|
+
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread m dl)
|
|
81
85
|
|
|
82
86
|
endif ()
|
|
83
87
|
|
|
84
88
|
if (${OPENGL_VERSION})
|
|
85
89
|
set(${SUGGESTED_GRAPHICS} "${GRAPHICS}")
|
|
86
|
-
if (${OPENGL_VERSION} MATCHES "
|
|
90
|
+
if (${OPENGL_VERSION} MATCHES "4.3")
|
|
91
|
+
set(GRAPHICS "GRAPHICS_API_OPENGL_43")
|
|
92
|
+
elseif (${OPENGL_VERSION} MATCHES "3.3")
|
|
87
93
|
set(GRAPHICS "GRAPHICS_API_OPENGL_33")
|
|
88
94
|
elseif (${OPENGL_VERSION} MATCHES "2.1")
|
|
89
95
|
set(GRAPHICS "GRAPHICS_API_OPENGL_21")
|
|
@@ -11,66 +11,69 @@
|
|
|
11
11
|
# raylib_LDFLAGS - The linker flags needed with raylib
|
|
12
12
|
# raylib_DEFINITIONS - Compiler switches required for using raylib
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
if (NOT TARGET raylib)
|
|
15
|
+
set(XPREFIX PC_RAYLIB)
|
|
15
16
|
|
|
16
|
-
find_package(PkgConfig QUIET)
|
|
17
|
-
pkg_check_modules(${XPREFIX} QUIET raylib)
|
|
17
|
+
find_package(PkgConfig QUIET)
|
|
18
|
+
pkg_check_modules(${XPREFIX} QUIET raylib)
|
|
18
19
|
|
|
19
|
-
if (raylib_USE_STATIC_LIBS)
|
|
20
|
-
|
|
21
|
-
endif()
|
|
20
|
+
if (raylib_USE_STATIC_LIBS)
|
|
21
|
+
set(XPREFIX ${XPREFIX}_STATIC)
|
|
22
|
+
endif()
|
|
22
23
|
|
|
23
|
-
set(raylib_DEFINITIONS ${${XPREFIX}_CFLAGS})
|
|
24
|
+
set(raylib_DEFINITIONS ${${XPREFIX}_CFLAGS})
|
|
24
25
|
|
|
25
|
-
find_path(raylib_INCLUDE_DIR
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
)
|
|
26
|
+
find_path(raylib_INCLUDE_DIR
|
|
27
|
+
NAMES raylib.h
|
|
28
|
+
HINTS ${${XPREFIX}_INCLUDE_DIRS}
|
|
29
|
+
)
|
|
29
30
|
|
|
30
|
-
set(RAYLIB_NAMES raylib)
|
|
31
|
+
set(RAYLIB_NAMES raylib)
|
|
31
32
|
|
|
32
|
-
if (raylib_USE_STATIC_LIBS)
|
|
33
|
-
|
|
34
|
-
endif()
|
|
33
|
+
if (raylib_USE_STATIC_LIBS)
|
|
34
|
+
set(RAYLIB_NAMES libraylib.a raylib.lib ${RAYLIB_NAMES})
|
|
35
|
+
endif()
|
|
35
36
|
|
|
36
|
-
find_library(raylib_LIBRARY
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
)
|
|
37
|
+
find_library(raylib_LIBRARY
|
|
38
|
+
NAMES ${RAYLIB_NAMES}
|
|
39
|
+
HINTS ${${XPREFIX}_LIBRARY_DIRS}
|
|
40
|
+
)
|
|
40
41
|
|
|
41
|
-
set(raylib_LIBRARIES ${raylib_LIBRARY})
|
|
42
|
-
set(raylib_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
|
|
43
|
-
set(raylib_LIBRARY_DIR ${raylib_LIBRARY_DIRS})
|
|
44
|
-
set(raylib_INCLUDE_DIRS ${raylib_INCLUDE_DIR})
|
|
45
|
-
set(raylib_LDFLAGS ${${XPREFIX}_LDFLAGS})
|
|
42
|
+
set(raylib_LIBRARIES ${raylib_LIBRARY})
|
|
43
|
+
set(raylib_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
|
|
44
|
+
set(raylib_LIBRARY_DIR ${raylib_LIBRARY_DIRS})
|
|
45
|
+
set(raylib_INCLUDE_DIRS ${raylib_INCLUDE_DIR})
|
|
46
|
+
set(raylib_LDFLAGS ${${XPREFIX}_LDFLAGS})
|
|
46
47
|
|
|
47
|
-
include(FindPackageHandleStandardArgs)
|
|
48
|
-
find_package_handle_standard_args(raylib DEFAULT_MSG
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
)
|
|
48
|
+
include(FindPackageHandleStandardArgs)
|
|
49
|
+
find_package_handle_standard_args(raylib DEFAULT_MSG
|
|
50
|
+
raylib_LIBRARY
|
|
51
|
+
raylib_INCLUDE_DIR
|
|
52
|
+
)
|
|
52
53
|
|
|
53
|
-
mark_as_advanced(raylib_LIBRARY raylib_INCLUDE_DIR)
|
|
54
|
+
mark_as_advanced(raylib_LIBRARY raylib_INCLUDE_DIR)
|
|
54
55
|
|
|
55
|
-
if (raylib_USE_STATIC_LIBS)
|
|
56
|
-
|
|
57
|
-
else()
|
|
58
|
-
|
|
59
|
-
endif()
|
|
60
|
-
string (REPLACE ";" " " raylib_LDFLAGS "${raylib_LDFLAGS}")
|
|
56
|
+
if (raylib_USE_STATIC_LIBS)
|
|
57
|
+
add_library(raylib STATIC IMPORTED GLOBAL)
|
|
58
|
+
else()
|
|
59
|
+
add_library(raylib SHARED IMPORTED GLOBAL)
|
|
60
|
+
endif()
|
|
61
|
+
string (REPLACE ";" " " raylib_LDFLAGS "${raylib_LDFLAGS}")
|
|
61
62
|
|
|
62
|
-
set_target_properties(raylib
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
set_target_properties(raylib
|
|
64
|
+
PROPERTIES
|
|
65
|
+
IMPORTED_LOCATION "${raylib_LIBRARIES}"
|
|
66
|
+
IMPORTED_IMPLIB "${raylib_LIBRARIES}"
|
|
67
|
+
INTERFACE_INCLUDE_DIRECTORIES "${raylib_INCLUDE_DIRS}"
|
|
68
|
+
INTERFACE_LINK_LIBRARIES "${raylib_LDFLAGS}"
|
|
69
|
+
INTERFACE_COMPILE_OPTIONS "${raylib_DEFINITIONS}"
|
|
70
|
+
)
|
|
69
71
|
|
|
70
|
-
if (raylib_VERBOSE)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
if (raylib_VERBOSE)
|
|
73
|
+
message(STATUS "raylib_FOUND: ${raylib_FOUND}")
|
|
74
|
+
message(STATUS "raylib_INCLUDE_DIRS: ${raylib_INCLUDE_DIRS}")
|
|
75
|
+
message(STATUS "raylib_LIBRARIES: ${raylib_LIBRARIES}")
|
|
76
|
+
message(STATUS "raylib_LDFLAGS: ${raylib_LDFLAGS}")
|
|
77
|
+
message(STATUS "raylib_DEFINITIONS: ${raylib_DEFINITIONS}")
|
|
78
|
+
endif()
|
|
76
79
|
endif()
|
|
@@ -52,7 +52,7 @@ foreach (example_dir ${example_dirs})
|
|
|
52
52
|
# Get the .c files
|
|
53
53
|
file(GLOB sources ${example_dir}/*.c)
|
|
54
54
|
list(APPEND example_sources ${sources})
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
# Any any resources
|
|
57
57
|
file(GLOB resources ${example_dir}/resources/*)
|
|
58
58
|
list(APPEND example_resources ${resources})
|
|
@@ -71,7 +71,7 @@ if (${PLATFORM} MATCHES "Android")
|
|
|
71
71
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_camera_free.c)
|
|
72
72
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_camera_first_person.c)
|
|
73
73
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_world_screen.c)
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_mesh_picking.c)
|
|
76
76
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_cubicmap.c)
|
|
77
77
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_skybox.c)
|
|
@@ -86,8 +86,8 @@ if (${PLATFORM} MATCHES "Android")
|
|
|
86
86
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_animation.c)
|
|
87
87
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_first_person_maze.c)
|
|
88
88
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_magicavoxel_loading.c)
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
|
|
90
|
+
|
|
91
91
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_custom_uniform.c)
|
|
92
92
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_model_shader.c)
|
|
93
93
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_postprocessing.c)
|
|
@@ -101,11 +101,16 @@ elseif (${PLATFORM} MATCHES "Web")
|
|
|
101
101
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s ALLOW_MEMORY_GROWTH=1 --no-heap-copy")
|
|
102
102
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
|
|
103
103
|
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
# Remove the -rdynamic flag because otherwise emscripten
|
|
106
106
|
# does not generate HTML+JS+WASM files, only a non-working
|
|
107
107
|
# and fat HTML
|
|
108
108
|
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
|
|
109
|
+
|
|
110
|
+
elseif ("${PLATFORM}" STREQUAL "DRM")
|
|
111
|
+
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
|
|
112
|
+
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
|
|
113
|
+
|
|
109
114
|
endif ()
|
|
110
115
|
|
|
111
116
|
include_directories(BEFORE SYSTEM others/external/include)
|
|
@@ -119,15 +124,15 @@ foreach (example_source ${example_sources})
|
|
|
119
124
|
# Create the basename for the example
|
|
120
125
|
get_filename_component(example_name ${example_source} NAME)
|
|
121
126
|
string(REPLACE ".c" "" example_name ${example_name})
|
|
122
|
-
|
|
127
|
+
|
|
123
128
|
# Setup the example
|
|
124
129
|
add_executable(${example_name} ${example_source})
|
|
125
|
-
|
|
130
|
+
|
|
126
131
|
target_link_libraries(${example_name} raylib)
|
|
127
|
-
|
|
132
|
+
|
|
128
133
|
string(REGEX MATCH ".*/.*/" resources_dir ${example_source})
|
|
129
134
|
string(APPEND resources_dir "resources")
|
|
130
|
-
|
|
135
|
+
|
|
131
136
|
if (${PLATFORM} MATCHES "Web" AND EXISTS ${resources_dir})
|
|
132
137
|
# The local resources path needs to be mapped to /resources virtual path
|
|
133
138
|
string(APPEND resources_dir "@resources")
|