diff options
| author | Joshua Reisenauer <[email protected]> | 2016-06-06 15:30:41 -0700 |
|---|---|---|
| committer | Joshua Reisenauer <[email protected]> | 2016-06-06 15:30:41 -0700 |
| commit | 76536fe24bb3b51164d4e94aebe8540b5f18f96e (patch) | |
| tree | 4cc7c7f8406c80ef1b8adf7319add2509c31242b /src/CMakeLists.txt | |
| parent | e3b248545353720090f28a6c4e8a8c8a34bb1269 (diff) | |
| parent | 1bcf500ecac076892c4eac0594b997add6dcac71 (diff) | |
| download | raylib-76536fe24bb3b51164d4e94aebe8540b5f18f96e.tar.gz raylib-76536fe24bb3b51164d4e94aebe8540b5f18f96e.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..c094ad96 --- /dev/null +++ b/src/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 -Wno-missing-braces") + +IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_DESKTOP") + + add_definitions(-DPLATFORM_DESKTOP, -DGRAPHICS_API_OPENGL_33) + include_directories("." "external/" "external/openal_soft/include" "external/glfw3/include") + +ENDIF() + +IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_RPI") + + add_definitions(-DPLATFORM_RPI, -GRAPHICS_API_OPENGL_ES2) + include_directories("." "external/" "/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("." "external/" "external/openal_soft/include" "external/glfw3/include") + +ENDIF() + + +file(GLOB SOURCES "*.c" "external/*.c") +add_library(raylib STATIC ${SOURCES}) +install(TARGETS raylib DESTINATION ../lib/)
\ No newline at end of file |
