mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 17:19:27 +00:00
Merge branch 'master' of github.com:RobLoach/raylib-cpp into next
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
# raylib-cpp [](https://github.com/RobLoach/raylib-cpp/actions?query=workflow%3ATests+branch%3Amaster) [](LICENSE)
|
||||
# raylib-cpp  [](https://github.com/RobLoach/raylib-cpp/actions?query=workflow%3ATests+branch%3Amaster) [](LICENSE)
|
||||
|
||||
[raylib-cpp](https://github.com/robloach/raylib-cpp) is a C++ wrapper library for [raylib](https://www.raylib.com), a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around *raylib*'s struct interfaces. *raylib-cpp* is not required to use *raylib* in C++, but the classes do bring using the raylib API more inline with C++'s language paradigm.
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ target_link_libraries(${PROJECT_NAME} PUBLIC raylib raylib_cpp)
|
||||
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()
|
||||
|
||||
# That's it! You should have an example executable that you can run. Have fun!
|
||||
|
||||
@@ -16,7 +16,7 @@ make
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-s USE_GLFW=3"
|
||||
emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release
|
||||
emmake make
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user