### Glob and Compile Example Sources Source: https://github.com/robloach/raylib-cpp/blob/master/examples/CMakeLists.txt Finds all .cpp files in specified example directories and compiles them into executables, linking against raylib and raylib-cpp. ```cmake foreach(example_dir ${example_dirs}) file(GLOB sources ${example_dir}/*.cpp) list(APPEND example_sources ${sources}) # Any any resources file(GLOB resources ${example_dir}/resources/*) list(APPEND example_resources ${resources}) endforeach() foreach(example_source ${example_sources}) # Create the basename for the example get_filename_component(example_name ${example_source} NAME) string(REPLACE ".cpp" "${OUTPUT_EXT}" example_name ${example_name}) # Setup the example add_executable(${example_name} ${example_source}) # Link raylib and raylib-cpp target_link_libraries(${example_name} PUBLIC raylib_cpp raylib) string(REGEX MATCH ".*/.*/" resources_dir ${example_source}) string(APPEND resources_dir "resources") endforeach() ``` -------------------------------- ### Basic Window Setup with raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/examples/core/resources/core_basic_window_web.html This snippet shows the essential configuration for initializing a raylib-cpp application, including setting up the canvas element for rendering. ```javascript var Module = { print: console.log, printErr: console.error, canvas: (function() { return document.getElementById('canvas'); })() } ``` -------------------------------- ### Run Compiled raylib-cpp Example Source: https://github.com/robloach/raylib-cpp/blob/master/projects/CMake/README.md Execute the compiled raylib-cpp application from the command line. ```bash ./raylib-cpp-example ``` -------------------------------- ### Compile raylib-cpp for Desktop Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Use CMake to build the library and run tests or examples on a desktop environment. Ensure you have git and CMake installed. ```bash git clone https://github.com/RobLoach/raylib-cpp.git cd raylib-cpp mkdir build cd build cmake .. make make test ./examples/core_basic_window ``` -------------------------------- ### Copy Resources Source: https://github.com/robloach/raylib-cpp/blob/master/examples/CMakeLists.txt Copies all collected example resources to the 'resources/' directory. ```cmake file(COPY ${example_resources} DESTINATION "resources/") ``` -------------------------------- ### Install Header Files Source: https://github.com/robloach/raylib-cpp/blob/master/include/CMakeLists.txt Installs the header files to the 'include' directory of the installation prefix. This makes the library's headers available when the project is installed. ```cmake install( FILES ${RAYLIB_CPP_HEADERS} DESTINATION include ) ``` -------------------------------- ### Project Setup and Dependency Fetching Source: https://github.com/robloach/raylib-cpp/blob/master/projects/CMake/CMakeLists.txt Configures the minimum CMake version and project name. It then attempts to find the raylib and raylib-cpp packages. If not found, it uses FetchContent to download and make them available from their respective Git repositories. ```cmake cmake_minimum_required(VERSION 3.14) project(raylib_cpp_example) # raylib find_package(raylib QUIET) if (NOT raylib_FOUND) include(FetchContent) FetchContent_Declare( raylib GIT_REPOSITORY https://github.com/raysan5/raylib.git GIT_TAG 6.0 GIT_SHALLOW 1 ) FetchContent_MakeAvailable(raylib) endif() # raylib-cpp find_package(raylib_cpp QUIET) if (NOT raylib_cpp_FOUND) if (NOT DEFINED RAYLIB_CPP_VERSION) set(RAYLIB_CPP_VERSION v6.0.0) endif() include(FetchContent) FetchContent_Declare( raylib_cpp GIT_REPOSITORY https://github.com/RobLoach/raylib-cpp.git GIT_TAG ${RAYLIB_CPP_VERSION} ) FetchContent_MakeAvailable(raylib_cpp) endif() ``` -------------------------------- ### Compile Multiple Source Files Example Source: https://github.com/robloach/raylib-cpp/blob/master/examples/CMakeLists.txt Compiles an executable from multiple source files and links it with raylib libraries. ```cmake add_executable("multiple" multiple/main.cpp multiple/Player.cpp) target_link_libraries("multiple" PUBLIC raylib_cpp raylib) ``` -------------------------------- ### Fetch and Add raylib Subdirectory Source: https://github.com/robloach/raylib-cpp/blob/master/examples/CMakeLists.txt Fetches the raylib library from GitHub using FetchContent and adds it as a subdirectory. Ensures raylib examples and games are not built. ```cmake include(FetchContent) FetchContent_Declare( raylib GIT_REPOSITORY https://github.com/raysan5/raylib.git GIT_TAG 6.0 GIT_SHALLOW 1 ) FetchContent_GetProperties(raylib) if (NOT raylib_POPULATED) # Have we downloaded raylib yet? set(FETCHCONTENT_QUIET NO) FetchContent_Populate(raylib) set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) set(BUILD_GAMES OFF CACHE BOOL "" FORCE) add_subdirectory(${raylib_SOURCE_DIR} ${raylib_BINARY_DIR}) endif() ``` -------------------------------- ### Compile raylib-cpp for Web with Emscripten Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Build and test the web version of raylib-cpp using Emscripten. This requires Emscripten SDK to be installed and configured. ```bash mkdir build cd build emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-s USE_GLFW=3" emmake make ``` -------------------------------- ### Specify Header Files Source: https://github.com/robloach/raylib-cpp/blob/master/include/CMakeLists.txt Lists all header files for the raylib-cpp library. These headers are used for installation and potentially for other build system operations. ```cmake set(RAYLIB_CPP_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/AudioDevice.hpp ${CMAKE_CURRENT_SOURCE_DIR}/AudioStream.hpp ${CMAKE_CURRENT_SOURCE_DIR}/AutomationEventList.hpp ${CMAKE_CURRENT_SOURCE_DIR}/BoundingBox.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Camera2D.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Camera3D.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Color.hpp ${CMAKE_CURRENT_SOURCE_DIR}/FileData.hpp ${CMAKE_CURRENT_SOURCE_DIR}/FileText.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Font.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Functions.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Gamepad.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Image.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Keyboard.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Material.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Matrix.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Mesh.hpp ${CMAKE_CURRENT_SOURCE_DIR}/MeshUnmanaged.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Model.hpp ${CMAKE_CURRENT_SOURCE_DIR}/ModelAnimation.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Mouse.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Music.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Quaternion.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Ray.hpp ${CMAKE_CURRENT_SOURCE_DIR}/RayCollision.hpp ${CMAKE_CURRENT_SOURCE_DIR}/RaylibException.hpp ${CMAKE_CURRENT_SOURCE_DIR}/raylib-cpp-utils.hpp ${CMAKE_CURRENT_SOURCE_DIR}/raylib-cpp.hpp ${CMAKE_CURRENT_SOURCE_DIR}/raylib.hpp ${CMAKE_CURRENT_SOURCE_DIR}/raymath.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Rectangle.hpp ${CMAKE_CURRENT_SOURCE_DIR}/RenderTexture.hpp ${CMAKE_CURRENT_SOURCE_DIR}/ShaderUnmanaged.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Shader.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Sound.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Text.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Texture.hpp ${CMAKE_CURRENT_SOURCE_DIR}/TextureUnmanaged.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Touch.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Vector2.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Vector3.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Vector4.hpp ${CMAKE_CURRENT_SOURCE_DIR}/VrStereoConfig.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Wave.hpp ${CMAKE_CURRENT_SOURCE_DIR}/Window.hpp ) ``` -------------------------------- ### Create a Basic Window with raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Demonstrates how to initialize a window, load a texture, and draw it to the screen using raylib-cpp. Includes automatic cleanup of resources like textures and windows. ```cpp #include "raylib-cpp.hpp" int main() { int screenWidth = 800; int screenHeight = 450; raylib::Window window(screenWidth, screenHeight, "raylib-cpp - basic window"); raylib::Texture logo("raylib_logo.png"); SetTargetFPS(60); while (!window.ShouldClose()) { BeginDrawing(); window.ClearBackground(raylib::Color::RayWhite()); DrawText("Congrats! You created your first window!", 190, 200, 20, raylib::Color::LightGray()); // Object methods. logo.Draw( screenWidth / 2 - logo.GetWidth() / 2, screenHeight / 2 - logo.GetHeight() / 2); EndDrawing(); } // UnloadTexture() and CloseWindow() are called automatically. return 0; } ``` -------------------------------- ### Clone raylib-cpp Starter Project Source: https://github.com/robloach/raylib-cpp/blob/master/projects/Make/README.md Use this command to clone the starter project repository. ```bash git clone https://github.com/CapsCollective/raylib-cpp-starter.git ``` -------------------------------- ### Build Desktop Project with CMake Source: https://github.com/robloach/raylib-cpp/blob/master/projects/CMake/README.md Use these commands to create a build directory, configure the project with CMake, and compile for desktop. ```bash mkdir build cd build cmake .. make ``` -------------------------------- ### Build raylib-cpp Project with Make Source: https://github.com/robloach/raylib-cpp/blob/master/projects/Make/README.md Commands to set up and build the raylib-cpp project using Make. Use mingw32-make for Windows. ```bash cd raylib-cpp-starter # Linux & macOS make setup make # Windows mingw32-make setup mingw32-make ``` -------------------------------- ### Build raylib-cpp Documentation Source: https://github.com/robloach/raylib-cpp/blob/master/projects/Doxygen/README.md Run these commands from the raylib-cpp root directory to build the documentation. Ensure the submodule is updated before running Doxygen. ```sh git submodule update --init doxygen projects/Doxygen/Doxyfile ``` -------------------------------- ### Deploy Documentation to GitHub Pages Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Execute the npm script to deploy the generated documentation to GitHub Pages. This command is typically used after building the documentation. ```bash npm run deploy ``` -------------------------------- ### Build Web Project with CMake and Emscripten Source: https://github.com/robloach/raylib-cpp/blob/master/projects/CMake/README.md Configure and build the project for the web using Emscripten's CMake wrapper and make. Ensure PLATFORM is set to Web and BUILD_TYPE to Release. ```bash mkdir build cd build emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release emmake make ``` -------------------------------- ### Object Constructors in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Demonstrates the use of C++ constructors for initializing raylib objects, replacing the LoadTexture function. ```cpp // raylib Texture2D texture = LoadTexture("texture.png"); // raylib-cpp raylib::Texture2D texture("texture.png"); ``` -------------------------------- ### Define Test Executable and Link Libraries Source: https://github.com/robloach/raylib-cpp/blob/master/tests/CMakeLists.txt Creates the test executable 'raylib_cpp_test' and links it with the raylib_cpp and raylib libraries. Includes platform-specific compiler options. ```cmake add_executable(raylib_cpp_test raylib_cpp_test.cpp) if (MSVC) target_compile_options(raylib_cpp_test PRIVATE /W4) else() target_compile_options(raylib_cpp_test PRIVATE -Wall -Wextra -Wconversion -Wsign-conversion -Weffc++) endif() target_link_libraries(raylib_cpp_test raylib_cpp raylib) ``` -------------------------------- ### Exception Handling for Asset Loading Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Compares raylib's error logging with raylib-cpp's exception handling for failed asset loads. Use raylib-cpp exceptions for safer error management. ```cpp // raylib Texture texture = LoadTexture("FileNotFound.png"); if (texture.width == 0) { TraceLog(LOG_ERROR, "Texture failed to load!"); } // raylib-cpp try { raylib::Texture texture("FileNotFound.png"); } catch (raylib::RaylibException& error) { TraceLog(LOG_ERROR, "Texture failed to load!"); } ``` -------------------------------- ### Web Platform Configuration Source: https://github.com/robloach/raylib-cpp/blob/master/projects/CMake/CMakeLists.txt Configures build settings specifically for the 'Web' platform. It sets the executable suffix to '.html' and applies Emscripten-specific linker options required for using Raylib in a web environment. ```cmake # Web Configurations if (${PLATFORM} STREQUAL "Web") # Tell Emscripten to build an example.html file. set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".html") # Required linker flags for using Raylib with Emscripten target_link_options(${PROJECT_NAME} PRIVATE -sEXPORTED_FUNCTIONS=['_main','_malloc'] -sEXPORTED_RUNTIME_METHODS=ccall -sUSE_GLFW=3) endif() ``` -------------------------------- ### Including raylib-cpp Header Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Illustrates the basic include statement required to use the raylib-cpp library in a C++ project. Ensure raylib is set up and linked correctly. ```cpp #include "path/to/raylib-cpp.hpp" ``` -------------------------------- ### Vector Rotation with RayMath Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Demonstrates vector rotation using both the original raylib math functions and the raylib-cpp object-oriented approach. The C++ version offers a more encapsulated method. ```cpp // raylib Vector2 direction = {50, 50}; Vector2 newDirection = Vector2Rotate(direction, 30); // raylib-cpp raylib::Vector2 direction(50, 50); raylib::Vector2 newDirection = direction.Rotate(30); ``` -------------------------------- ### Object Methods in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Shows how raylib-cpp allows calling methods directly on objects, simplifying drawing operations compared to raylib's function-based approach. ```cpp // raylib Vector2 position(50, 50); DrawPixelV(position, PURPLE); // raylib-cpp raylib::Vector2 position(50, 50); position.DrawPixel(raylib::Color::Purple()); ``` -------------------------------- ### Importing raylib as a C++20 Module Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Shows how to import the raylib library as a C++20 module using `import raylib;`. This requires the build system to be configured with `BUILD_RAYLIB_CPP_MODULES`. ```cpp import raylib; using raylib::Texture; using raylib::Window; int main() { int screenWidth = 800; int screenHeight = 450; Window window(screenWidth, screenHeight, "raylib-cpp - basic window"); Texture logo("raylib_logo.png"); // ... } ``` -------------------------------- ### Function Overloading for Methods in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Shows how raylib-cpp uses function overloading to handle methods with different parameter types, such as DrawPixelV in raylib becoming DrawPixel with different overloads in raylib-cpp. ```cpp // raylib Color color = GRAY; DrawPixel(50, 50, color); Vector2 position = {50.0f, 50.0f}; DrawPixelV(position, color); // Extra V in method name. // raylib-cpp raylib::Color color = raylib::Color::Gray(); color.DrawPixel(50, 50); Vector2 position(50.0f, 50.0f); color.DrawPixel(position); // No V in method name. position.DrawPixel(color); // Alternatively ``` -------------------------------- ### Automatic Resource Management in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Explains that raylib-cpp objects automatically manage their resources (like windows and textures) and unload them upon destruction, eliminating the need for manual Unload or Close calls. ```cpp // raylib InitWindow(640, 480, "Hello World"); CloseWindow(); // raylib-cpp raylib::Window window(640, 480, "Hello World"); // window.Close() will be called automatically when the object is destructed. ``` -------------------------------- ### Operator Overloading in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Demonstrates the use of operator overloading in raylib-cpp for common operations, such as vector addition, simplifying code compared to manual component-wise manipulation. ```cpp // raylib Vector2 position = {50, 50}; Vector2 speed = {10, 10}; position.x += speed.x; position.y += speed.y; // raylib-cpp raylib::Vector2 position(50, 50); raylib::Vector2 speed(10, 10); position += speed; // Addition assignment operator override. ``` -------------------------------- ### Optional Parameters in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Highlights the use of optional parameters in raylib-cpp methods, providing default values for common use cases like color tinting. ```cpp // raylib DrawTexture(texture, 50, 50, WHITE); // raylib-cpp texture.Draw(50, 50); // raylib::Color::White() is provided as the default tint. ``` -------------------------------- ### Set C++ Standard and Test Options Source: https://github.com/robloach/raylib-cpp/blob/master/tests/CMakeLists.txt Configures the C++ standard to C++11 and ignores specific tests for pkg-config. ```cmake set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CTEST_CUSTOM_TESTS_IGNORE pkg-config--static) ``` -------------------------------- ### Copy Resources Source: https://github.com/robloach/raylib-cpp/blob/master/tests/CMakeLists.txt Copies the 'resources/' directory to the destination, typically used for test assets. ```cmake file(COPY resources/ DESTINATION "resources/") ``` -------------------------------- ### Method Chaining in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Illustrates method chaining in raylib-cpp, where methods that don't return a value often return the object itself, allowing for sequential method calls on the same object. ```cpp // raylib Image cat = ImageLoad("cat.png"); ImageCrop(&cat, (Rectangle){ 100, 10, 280, 380 }); ImageFlipHorizontal(&cat); ImageResize(&cat, 150, 200); // raylib-cpp raylib::Image cat("cat.png"); cat.Crop(100, 10, 280, 380) .FlipHorizontal() .Resize(150, 200); ``` -------------------------------- ### Executable Target and Linking Source: https://github.com/robloach/raylib-cpp/blob/master/projects/CMake/CMakeLists.txt Defines the main source file and creates an executable target. It sets the C++ standard to C++11 and links the public libraries raylib and raylib_cpp to the executable. ```cmake set(SOURCES main.cpp) add_executable(${PROJECT_NAME} ${SOURCES}) set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) target_link_libraries(${PROJECT_NAME} PUBLIC raylib raylib_cpp) ``` -------------------------------- ### Property Get/Set in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Demonstrates accessing and modifying object properties using getter/setter methods or direct member access in raylib-cpp. ```cpp // raylib Vector2 position; position.x = 50; position.y = 100; // raylib-cpp raylib::Vector2 position; position.SetX(50); position.SetY(100); // ... or position.x = 50; position.y = 100; ``` -------------------------------- ### Simplified Method Names in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Illustrates how raylib-cpp removes object names from method calls for brevity, such as simplifying DrawTexture to texture.Draw. ```cpp // raylib DrawTexture(texture, 50, 50, WHITE); // raylib-cpp texture.Draw(50, 50, raylib::Color::White()); ``` -------------------------------- ### Format Code Source: https://github.com/robloach/raylib-cpp/blob/master/include/CMakeLists.txt Creates a custom target named 'format' that uses clang-format to automatically format the library's header files. This target is only available if RAYLIB_CPP_IS_MAIN is defined. ```cmake if (RAYLIB_CPP_IS_MAIN) # @TODO: add examples files add_custom_target(format COMMAND clang-format -i ${RAYLIB_CPP_HEADERS} ) endif() ``` -------------------------------- ### Vector-Based Returns in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Explains how raylib-cpp replaces pointer-array return types with std::vector, providing a more modern C++ interface for functions like LoadDirectoryFiles. ```cpp // raylib FilePathList files = LoadDirectoryFiles("."); TraceLog(LOG_INFO, "Count: %i", files.count); for (int i = 0; i < files.count; i++) { TraceLog(LOG_INFO, "File: %s", files.paths[i]); } UnloadDirectoryFiles(files); // raylib-cpp std::vector files = raylib::LoadDirectoryFiles("."); TraceLog(LOG_INFO, "Count: %i", files.size()); for (auto& file : files) { TraceLog(LOG_INFO, "File: %s", file.c_str()); } ``` -------------------------------- ### Check Coding Standards with cpplint Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Run cpplint recursively on the 'include' directory to enforce coding standards. This helps maintain code consistency across the project. ```bash cpplint --recursive include ``` -------------------------------- ### std::string Integration in raylib-cpp Source: https://github.com/robloach/raylib-cpp/blob/master/README.md Shows how raylib-cpp provides overrides for string functions, allowing direct use of std::string objects without needing to call .c_str(). ```cpp // raylib const char* url = "https://raylib.com"; OpenURL(url); // raylib-cpp std::string url = "https://raylib.com"; raylib::OpenURL(url); ``` -------------------------------- ### Set C++ Standard and Extensions Source: https://github.com/robloach/raylib-cpp/blob/master/examples/CMakeLists.txt Configures the C++ standard to C++11 and disables C++ extensions for broader compatibility. ```cmake set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) ``` -------------------------------- ### Set Include Directories Source: https://github.com/robloach/raylib-cpp/blob/master/include/CMakeLists.txt Configures the include directories for the raylib_cpp target. This allows the compiler to find the header files when building projects that depend on raylib-cpp. ```cmake target_include_directories(raylib_cpp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/) ``` -------------------------------- ### Saving File from Memory to Disk Source: https://github.com/robloach/raylib-cpp/blob/master/examples/core/resources/core_basic_window_web.html This JavaScript function demonstrates how to save data from memory to a local file using the File System Access API. It includes a check for Safari browser compatibility. ```javascript function saveFileFromMEMFSToDisk(memoryFSname, localFSname) { var isSafari = false; var data = FS.readFile(memoryFSname); var blob; if (isSafari) blob = new Blob([data.buffer], { type: "application/octet-stream" }); else blob = new Blob([data.buffer], { type: "application/octet-binary" }); saveAs(blob, localFSname); } ``` -------------------------------- ### Define raylib-cpp Library Source: https://github.com/robloach/raylib-cpp/blob/master/include/CMakeLists.txt Defines the raylib-cpp library as an INTERFACE library. This is typically used for header-only libraries or when the library's implementation is provided by other targets. ```cmake add_library(raylib_cpp INTERFACE) ``` -------------------------------- ### Add CTest Test Case Source: https://github.com/robloach/raylib-cpp/blob/master/tests/CMakeLists.txt Appends arguments to CTest and defines a test named 'raylib_cpp_test' that executes the compiled program. ```cmake list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") add_test(NAME raylib_cpp_test COMMAND raylib_cpp_test) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.