diff options
| author | Ray <raysan5@gmail.com> | 2016-05-27 19:55:41 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2016-05-27 19:55:41 +0200 |
| commit | 27df983ee0ab72917756b95b49fb31319a6d813f (patch) | |
| tree | 8755884114784e71d424ce10d72c572a3f6d9350 | |
| parent | 3d6696f6c981a7a8f523d631926380eced475733 (diff) | |
| parent | 5a041a6af58a221060e8202cd0a12a1aa562838c (diff) | |
| download | raylib-27df983ee0ab72917756b95b49fb31319a6d813f.tar.gz raylib-27df983ee0ab72917756b95b49fb31319a6d813f.zip | |
Merge pull request #121 from kd7tck/develop
I made this for some others I am now working with
| -rw-r--r-- | CMakeLists.txt | 32 | ||||
| -rw-r--r-- | src/windows_compile.bat | 2 |
2 files changed, 32 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..8689e9ad --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required (VERSION 3.0) +project (raylib) +SET(PLATFORM_TO_USE "PLATFORM_DESKTOP" CACHE STRING "Platform to compile for") +SET_PROPERTY(CACHE PLATFORM_TO_USE PROPERTY STRINGS PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB) + +set(CMAKE_C_FLAGS "-O1 -Wall -std=gnu99 -fgnu89-inline") + +IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_DESKTOP") + + add_definitions(-DPLATFORM_DESKTOP, -DGRAPHICS_API_OPENGL_33) + include_directories("." "src/" "external/openal_soft/include" "external/glew/include" "external/glfw3/include") + +ENDIF() + +IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_RPI") + + add_definitions(-DPLATFORM_RPI, -GRAPHICS_API_OPENGL_ES2) + include_directories("." "/opt/vc/include" "/opt/vc/include/interface/vmcs_host/linux" "/opt/vc/include/interface/vcos/pthreads") + +ENDIF() + +IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_WEB") + + add_definitions(-DPLATFORM_WEB, -GRAPHICS_API_OPENGL_ES2) + include_directories("." "src/" "external/openal_soft/include" "external/glew/include" "external/glfw3/include") + +ENDIF() + + +file(GLOB SOURCES "src/*.c") +add_library(raylib STATIC ${SOURCES}) +install(TARGETS raylib DESTINATION lib/)
\ No newline at end of file diff --git a/src/windows_compile.bat b/src/windows_compile.bat deleted file mode 100644 index f1d0fb29..00000000 --- a/src/windows_compile.bat +++ /dev/null @@ -1,2 +0,0 @@ -set PATH=C:\raylib\MinGW\bin;%PATH% -mingw32-make
\ No newline at end of file |
