this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Shortened CMake options (removed redundant SDL_gpu prefix).

authored by

Jonathan Dearborn and committed by
Alice
0555a245 d3d5d1b6

+151 -151
+1 -1
.appveyor.yml
··· 52 52 - if "%configuration%"=="Debug" ( set build_demos=OFF ) 53 53 - if "%configuration%"=="Release" ( set build_tests=OFF ) 54 54 - if "%configuration%"=="Release" ( set build_demos=OFF ) 55 - - cmd: cmake -G %generator% -A %platform% -DCMAKE_INSTALL_PREFIX=c:\projects\libs\SDL2 -DSDL_gpu_BUILD_DEMOS=%build_demos% -DSDL_gpu_BUILD_TESTS=%build_tests% -DSDL_gpu_BUILD_TOOLS=%build_demos% -DSDL_gpu_BUILD_SHARED=ON -DSDL_gpu_BUILD_STATIC=ON .. 55 + - cmd: cmake -G %generator% -A %platform% -DCMAKE_INSTALL_PREFIX=c:\projects\libs\SDL2 -DBUILD_DEMOS=%build_demos% -DBUILD_TESTS=%build_tests% -DBUILD_TOOLS=%build_demos% -DBUILD_SHARED=ON -DBUILD_STATIC=ON .. 56 56 57 57 after_build: 58 58 - cd c:\projects\SDL_gpu\build\SDL_gpu-VS
+114 -114
CMakeLists.txt
··· 36 36 #endif") 37 37 file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/include/SDL_gpu_version.h ${VERSION_HEADER_CONTENTS}) 38 38 39 - set(SDL_gpu_INSTALL_BY_DEFAULT ON) 40 - set(SDL_gpu_DEFAULT_BUILD_SHARED ON) 41 - set(SDL_gpu_DEFAULT_BUILD_STATIC ON) 42 - set(SDL_gpu_DEFAULT_BUILD_DEMOS ON) 43 - set(SDL_gpu_DEFAULT_DISABLE_OPENGL OFF) 44 - set(SDL_gpu_DEFAULT_DISABLE_GLES ON) 39 + set(DEFAULT_INSTALL_LIBRARY ON) 40 + set(DEFAULT_BUILD_SHARED ON) 41 + set(DEFAULT_BUILD_STATIC ON) 42 + set(DEFAULT_BUILD_DEMOS ON) 43 + set(DEFAULT_DISABLE_OPENGL OFF) 44 + set(DEFAULT_DISABLE_GLES ON) 45 45 46 46 if(IOS) 47 47 message(" Using iOS defaults.") 48 - set(SDL_gpu_INSTALL_BY_DEFAULT OFF) 49 - set(SDL_gpu_DEFAULT_BUILD_DEMOS OFF) 50 - set(SDL_gpu_DEFAULT_DISABLE_OPENGL ON) 51 - set(SDL_gpu_DEFAULT_DISABLE_GLES OFF) 48 + set(DEFAULT_INSTALL_LIBRARY OFF) 49 + set(DEFAULT_BUILD_DEMOS OFF) 50 + set(DEFAULT_DISABLE_OPENGL ON) 51 + set(DEFAULT_DISABLE_GLES OFF) 52 52 # iOS 8 may need the framework option 53 - set(SDL_gpu_DEFAULT_BUILD_SHARED OFF) 54 - set(SDL_gpu_DEFAULT_BUILD_STATIC ON) 53 + set(DEFAULT_BUILD_SHARED OFF) 54 + set(DEFAULT_BUILD_STATIC ON) 55 55 elseif(APPLE) 56 56 message(" Using Apple defaults.") 57 - set(SDL_gpu_DEFAULT_BUILD_SHARED ON) 58 - option(SDL_gpu_BUILD_FRAMEWORK "Build SDL_gpu as Apple framework" ON) 59 - set(SDL_gpu_DEFAULT_BUILD_STATIC ON) 57 + set(DEFAULT_BUILD_SHARED ON) 58 + option(BUILD_FRAMEWORK "Build SDL_gpu as Apple framework" ON) 59 + set(DEFAULT_BUILD_STATIC ON) 60 60 elseif(ANDROID) 61 61 message(" Using Android defaults.") 62 - set(SDL_gpu_INSTALL_BY_DEFAULT OFF) 63 - set(SDL_gpu_DEFAULT_BUILD_DEMOS OFF) 64 - set(SDL_gpu_DEFAULT_DISABLE_OPENGL ON) 65 - set(SDL_gpu_DEFAULT_DISABLE_GLES OFF) 66 - set(SDL_gpu_DEFAULT_BUILD_SHARED ON) 67 - set(SDL_gpu_DEFAULT_BUILD_STATIC OFF) 62 + set(DEFAULT_INSTALL_LIBRARY OFF) 63 + set(DEFAULT_BUILD_DEMOS OFF) 64 + set(DEFAULT_DISABLE_OPENGL ON) 65 + set(DEFAULT_DISABLE_GLES OFF) 66 + set(DEFAULT_BUILD_SHARED ON) 67 + set(DEFAULT_BUILD_STATIC OFF) 68 68 elseif(WIN32) 69 69 message(" Using Windows defaults.") 70 - set(SDL_gpu_INSTALL_BY_DEFAULT OFF) 70 + set(DEFAULT_INSTALL_LIBRARY OFF) 71 71 elseif(("${CMAKE_SYSTEM}" MATCHES "Linux") AND ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")) 72 72 message(" Using Linux ARM defaults.") 73 73 ··· 79 79 add_definitions(-DADD_MISSING_OES_FUNCTIONS) 80 80 endif() 81 81 82 - set(SDL_gpu_DEFAULT_BUILD_DEMOS OFF) 83 - set(SDL_gpu_DEFAULT_DISABLE_OPENGL ON) 84 - set(SDL_gpu_DEFAULT_DISABLE_GLES OFF) 82 + set(DEFAULT_BUILD_DEMOS OFF) 83 + set(DEFAULT_DISABLE_OPENGL ON) 84 + set(DEFAULT_DISABLE_GLES OFF) 85 85 elseif(EMSCRIPTEN) 86 86 message(" Using Emscripten defaults.") 87 - set(SDL_gpu_INSTALL_BY_DEFAULT OFF) 88 - set(SDL_gpu_DEFAULT_BUILD_DEMOS OFF) 89 - set(SDL_gpu_DEFAULT_DISABLE_OPENGL ON) 90 - set(SDL_gpu_DEFAULT_DISABLE_GLES OFF) 91 - set(SDL_gpu_DEFAULT_BUILD_SHARED OFF) 87 + set(DEFAULT_INSTALL_LIBRARY OFF) 88 + set(DEFAULT_BUILD_DEMOS OFF) 89 + set(DEFAULT_DISABLE_OPENGL ON) 90 + set(DEFAULT_DISABLE_GLES OFF) 91 + set(DEFAULT_BUILD_SHARED OFF) 92 92 else() 93 93 message(" Using generic defaults.") 94 94 endif() 95 95 96 96 97 - option(SDL_gpu_INSTALL "Install SDL_gpu libs, includes, and CMake scripts" ${SDL_gpu_INSTALL_BY_DEFAULT}) 98 - #option(SDL_gpu_BUILD_DEBUG "Build with debugging symbols" ON) 99 - option(SDL_gpu_BUILD_DEMOS "Build SDL_gpu demo programs" ${SDL_gpu_DEFAULT_BUILD_DEMOS}) 100 - option(SDL_gpu_BUILD_TESTS "Build SDL_gpu test programs" OFF) 101 - option(SDL_gpu_BUILD_VIDEO_TEST "Build SDL_gpu video test program (requires FFMPEG)" OFF) 102 - option(SDL_gpu_BUILD_TOOLS "Build SDL_gpu tool programs" OFF) 103 - option(SDL_gpu_USE_SDL1 "Use SDL 1.2 headers and library instead of SDL 2" OFF) 104 - option(SDL_gpu_DISABLE_OPENGL "Disable OpenGL renderers. Overrides specific OpenGL renderer flags." ${SDL_gpu_DEFAULT_DISABLE_OPENGL}) 105 - option(SDL_gpu_DISABLE_GLES "Disable OpenGLES renderers. Overrides specific GLES renderer flags." ${SDL_gpu_DEFAULT_DISABLE_GLES}) 106 - option(SDL_gpu_DISABLE_OPENGL_1_BASE "Disable OpenGL 1 BASE renderer" OFF) 107 - option(SDL_gpu_DISABLE_OPENGL_1 "Disable OpenGL 1.X renderer" OFF) 108 - option(SDL_gpu_DISABLE_OPENGL_2 "Disable OpenGL 2.X renderer" OFF) 109 - option(SDL_gpu_DISABLE_OPENGL_3 "Disable OpenGL 3.X renderer" OFF) 110 - option(SDL_gpu_DISABLE_OPENGL_4 "Disable OpenGL 4.X renderer" OFF) 111 - option(SDL_gpu_DISABLE_GLES_1 "Disable OpenGLES 1.X renderer" OFF) 112 - option(SDL_gpu_DISABLE_GLES_2 "Disable OpenGLES 2.X renderer" OFF) 113 - option(SDL_gpu_DISABLE_GLES_3 "Disable OpenGLES 3.X renderer" OFF) 97 + option(INSTALL_LIBRARY "Install SDL_gpu libs, includes, and CMake scripts" ${DEFAULT_INSTALL_LIBRARY}) 98 + #option(BUILD_DEBUG "Build with debugging symbols" ON) 99 + option(BUILD_DEMOS "Build SDL_gpu demo programs" ${DEFAULT_BUILD_DEMOS}) 100 + option(BUILD_TESTS "Build SDL_gpu test programs" OFF) 101 + option(BUILD_VIDEO_TEST "Build SDL_gpu video test program (requires FFMPEG)" OFF) 102 + option(BUILD_TOOLS "Build SDL_gpu tool programs" OFF) 103 + option(USE_SDL1 "Use SDL 1.2 headers and library instead of SDL 2" OFF) 104 + option(DISABLE_OPENGL "Disable OpenGL renderers. Overrides specific OpenGL renderer flags." ${SDL_gpu_DEFAULT_DISABLE_OPENGL}) 105 + option(DISABLE_GLES "Disable OpenGLES renderers. Overrides specific GLES renderer flags." ${SDL_gpu_DEFAULT_DISABLE_GLES}) 106 + option(DISABLE_OPENGL_1_BASE "Disable OpenGL 1 BASE renderer" OFF) 107 + option(DISABLE_OPENGL_1 "Disable OpenGL 1.X renderer" OFF) 108 + option(DISABLE_OPENGL_2 "Disable OpenGL 2.X renderer" OFF) 109 + option(DISABLE_OPENGL_3 "Disable OpenGL 3.X renderer" OFF) 110 + option(DISABLE_OPENGL_4 "Disable OpenGL 4.X renderer" OFF) 111 + option(DISABLE_GLES_1 "Disable OpenGLES 1.X renderer" OFF) 112 + option(DISABLE_GLES_2 "Disable OpenGLES 2.X renderer" OFF) 113 + option(DISABLE_GLES_3 "Disable OpenGLES 3.X renderer" OFF) 114 114 115 - option(SDL_gpu_USE_SYSTEM_GLEW "Attempt to use the system GLEW library (may not support GL 3+)" OFF) 116 - option(SDL_gpu_DYNAMIC_GLES_3 "Attempt to run-time link to GLES 3" OFF) 115 + option(USE_SYSTEM_GLEW "Attempt to use the system GLEW library (may not support GL 3+)" OFF) 116 + option(DYNAMIC_GLES_3 "Attempt to run-time link to GLES 3" OFF) 117 117 118 - option(SDL_gpu_USE_BUFFER_RESET "Upload VBOs by requesting a new one each time (default). This is often the best for driver optimization)" ON) 119 - option(SDL_gpu_USE_BUFFER_UPDATE "Upload VBOs by updating only the needed portion" OFF) 120 - option(SDL_gpu_USE_BUFFER_MAPPING "Upload VBOs by mapping to client memory" OFF) 118 + option(USE_BUFFER_RESET "Upload VBOs by requesting a new one each time (default). This is often the best for driver optimization)" ON) 119 + option(USE_BUFFER_UPDATE "Upload VBOs by updating only the needed portion" OFF) 120 + option(USE_BUFFER_MAPPING "Upload VBOs by mapping to client memory" OFF) 121 121 122 122 123 123 124 - option(SDL_gpu_BUILD_SHARED "Build SDL_gpu shared libraries" ${SDL_gpu_DEFAULT_BUILD_SHARED}) 125 - option(SDL_gpu_BUILD_STATIC "Build SDL_gpu static libraries" ${SDL_gpu_DEFAULT_BUILD_STATIC}) 124 + option(BUILD_SHARED "Build SDL_gpu shared libraries" ${DEFAULT_BUILD_SHARED}) 125 + option(BUILD_STATIC "Build SDL_gpu static libraries" ${SDL_gpu_DEFAULT_BUILD_STATIC}) 126 126 127 - set(SDL_gpu_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUGFIX}) 127 + set(SDL_GPU_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUGFIX}) 128 128 129 - if (SDL_gpu_USE_SDL1) 130 - set(SDL_gpu_LIBRARY SDL_gpu) 131 - else (SDL_gpu_USE_SDL1) 132 - set(SDL_gpu_LIBRARY SDL2_gpu) 133 - endif (SDL_gpu_USE_SDL1) 129 + if (USE_SDL1) 130 + set(SDL_GPU_LIBRARY SDL_gpu) 131 + else (USE_SDL1) 132 + set(SDL_GPU_LIBRARY SDL2_gpu) 133 + endif (USE_SDL1) 134 134 135 135 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/scripts) 136 136 ··· 138 138 include(ios-cmake/toolchain/XcodeDefaults) 139 139 endif() 140 140 141 - #if ( SDL_gpu_BUILD_DEBUG ) 141 + #if ( BUILD_DEBUG ) 142 142 # SET(CMAKE_BUILD_TYPE Debug) 143 - #else ( SDL_gpu_BUILD_DEBUG ) 143 + #else ( BUILD_DEBUG ) 144 144 # SET(CMAKE_BUILD_TYPE Release) 145 - #endif ( SDL_gpu_BUILD_DEBUG ) 145 + #endif ( BUILD_DEBUG ) 146 146 147 147 if (CMAKE_VERSION VERSION_LESS "3.1") 148 148 if (CMAKE_C_COMPILER_ID STREQUAL "GNU") ··· 153 153 endif () 154 154 155 155 # Find the package for SDL or SDL2 156 - if ( SDL_gpu_USE_SDL1 ) 156 + if ( USE_SDL1 ) 157 157 find_package(SDL REQUIRED) 158 158 159 159 if ( NOT SDL_FOUND ) ··· 162 162 163 163 include_directories(${SDL_INCLUDE_DIR}) 164 164 link_libraries(${SDL_LIBRARY}) 165 - else ( SDL_gpu_USE_SDL1 ) 165 + else ( USE_SDL1 ) 166 166 find_package(SDL2 REQUIRED) 167 167 168 168 if ( NOT SDL2_FOUND ) ··· 176 176 177 177 include_directories(${SDL2_INCLUDE_DIR}) 178 178 link_libraries(${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY}) 179 - endif( SDL_gpu_USE_SDL1 ) 179 + endif( USE_SDL1 ) 180 180 181 181 # Find the package for OpenGL 182 - if (SDL_gpu_DISABLE_OPENGL) 182 + if (DISABLE_OPENGL) 183 183 add_definitions("-DSDL_GPU_DISABLE_OPENGL") 184 - else (SDL_gpu_DISABLE_OPENGL) 184 + else (DISABLE_OPENGL) 185 185 186 186 find_package(OpenGL REQUIRED) 187 187 include_directories(${OPENGL_INCLUDE_DIR}) 188 188 if(APPLE AND NOT IOS) 189 189 # CMake incorrectly includes AGL.framework in OPENGL_LIBRARIES which is obsolete. 190 190 # link_libraries(${OPENGL_gl_LIBRARY}) 191 - set(SDL_gpu_GL_LIBRARIES ${OPENGL_gl_LIBRARY}) 191 + set(GL_LIBRARIES ${OPENGL_gl_LIBRARY}) 192 192 else() 193 193 # link_libraries(${OPENGL_LIBRARIES}) 194 - set(SDL_gpu_GL_LIBRARIES ${OPENGL_LIBRARIES}) 194 + set(GL_LIBRARIES ${OPENGL_LIBRARIES}) 195 195 endif() 196 196 197 197 198 - if (SDL_gpu_DISABLE_OPENGL_1_BASE) 198 + if (DISABLE_OPENGL_1_BASE) 199 199 add_definitions("-DSDL_GPU_DISABLE_OPENGL_1_BASE") 200 - endif (SDL_gpu_DISABLE_OPENGL_1_BASE) 201 - if (SDL_gpu_DISABLE_OPENGL_1) 200 + endif (DISABLE_OPENGL_1_BASE) 201 + if (DISABLE_OPENGL_1) 202 202 add_definitions("-DSDL_GPU_DISABLE_OPENGL_1") 203 - endif (SDL_gpu_DISABLE_OPENGL_1) 204 - if (SDL_gpu_DISABLE_OPENGL_2) 203 + endif (DISABLE_OPENGL_1) 204 + if (DISABLE_OPENGL_2) 205 205 add_definitions("-DSDL_GPU_DISABLE_OPENGL_2") 206 - endif (SDL_gpu_DISABLE_OPENGL_2) 207 - if (SDL_gpu_DISABLE_OPENGL_3) 206 + endif (DISABLE_OPENGL_2) 207 + if (DISABLE_OPENGL_3) 208 208 add_definitions("-DSDL_GPU_DISABLE_OPENGL_3") 209 - endif (SDL_gpu_DISABLE_OPENGL_3) 210 - if (SDL_gpu_DISABLE_OPENGL_4) 209 + endif (DISABLE_OPENGL_3) 210 + if (DISABLE_OPENGL_4) 211 211 add_definitions("-DSDL_GPU_DISABLE_OPENGL_4") 212 - endif (SDL_gpu_DISABLE_OPENGL_4) 212 + endif (DISABLE_OPENGL_4) 213 213 214 - if(SDL_gpu_USE_SYSTEM_GLEW) 214 + if(USE_SYSTEM_GLEW) 215 215 # If glew is not found here, we’ll use the bundled version 216 216 find_package(GLEW) 217 217 endif() ··· 221 221 endif(NOT GLEW_FOUND) 222 222 223 223 224 - if (NOT SDL_gpu_DISABLE_OPENGL) 224 + if (NOT DISABLE_OPENGL) 225 225 if(GLEW_FOUND) 226 226 # Look in the GL subdirectory, too. 227 227 foreach(GL_DIR ${GLEW_INCLUDE_DIRS}) ··· 235 235 SET(SDL_gpu_HDRS ${SDL_gpu_HDRS} externals/glew/GL/glew.h externals/glew/GL/glxew.h externals/glew/GL/wglew.h) 236 236 add_definitions("-DGLEW_STATIC") 237 237 endif(GLEW_FOUND) 238 - endif(NOT SDL_gpu_DISABLE_OPENGL) 238 + endif(NOT DISABLE_OPENGL) 239 239 240 - endif (SDL_gpu_DISABLE_OPENGL) 240 + endif (DISABLE_OPENGL) 241 241 242 242 # Find the package for OpenGLES 243 - if (SDL_gpu_DISABLE_GLES) 243 + if (DISABLE_GLES) 244 244 add_definitions("-DSDL_GPU_DISABLE_GLES") 245 - else (SDL_gpu_DISABLE_GLES) 245 + else (DISABLE_GLES) 246 246 247 247 if(ANDROID) 248 248 249 - if (NOT SDL_gpu_DISABLE_GLES_1) 249 + if (NOT DISABLE_GLES_1) 250 250 find_library( ANDROID_GLES1_LIBRARY GLESv1_CM ) 251 251 link_libraries( 252 252 ${ANDROID_GLES1_LIBRARY} 253 253 ) 254 254 endif() 255 - if (NOT SDL_gpu_DISABLE_GLES_2) 255 + if (NOT DISABLE_GLES_2) 256 256 find_library( ANDROID_GLES2_LIBRARY GLESv2 ) 257 257 link_libraries( 258 258 ${ANDROID_GLES2_LIBRARY} ··· 265 265 find_package(OpenGLES REQUIRED) 266 266 include_directories(${OPENGLES_INCLUDE_DIR}) 267 267 # link_libraries (${OPENGLES_LIBRARIES}) 268 - set(SDL_gpu_GL_LIBRARIES ${OPENGLES_LIBRARIES}) 268 + set(GL_LIBRARIES ${OPENGLES_LIBRARIES}) 269 269 endif() 270 270 271 - if (SDL_gpu_DISABLE_GLES_1) 271 + if (DISABLE_GLES_1) 272 272 add_definitions("-DSDL_GPU_DISABLE_GLES_1") 273 - endif (SDL_gpu_DISABLE_GLES_1) 274 - if (SDL_gpu_DISABLE_GLES_2) 273 + endif (DISABLE_GLES_1) 274 + if (DISABLE_GLES_2) 275 275 add_definitions("-DSDL_GPU_DISABLE_GLES_2") 276 - endif (SDL_gpu_DISABLE_GLES_2) 277 - if (SDL_gpu_DISABLE_GLES_3) 276 + endif (DISABLE_GLES_2) 277 + if (DISABLE_GLES_3) 278 278 add_definitions("-DSDL_GPU_DISABLE_GLES_3") 279 - endif (SDL_gpu_DISABLE_GLES_3) 279 + endif (DISABLE_GLES_3) 280 280 281 281 include_directories(src/externals/gl3stub) 282 - if (SDL_gpu_DYNAMIC_GLES_3) 282 + if (DYNAMIC_GLES_3) 283 283 SET(SDL_gpu_HDRS ${SDL_gpu_HDRS} externals/gl3stub/gl3stub.c externals/gl3stub/gl3stub.h) 284 284 add_definitions("-DSDL_GPU_DYNAMIC_GLES_3") 285 - endif(SDL_gpu_DYNAMIC_GLES_3) 286 - endif (SDL_gpu_DISABLE_GLES) 285 + endif(DYNAMIC_GLES_3) 286 + endif (DISABLE_GLES) 287 287 288 288 # If stb-image is not found here, we’ll use the bundled version 289 289 find_package(STBI) ··· 337 337 338 338 add_definitions("-Wall -pedantic") 339 339 340 - if (SDL_gpu_USE_BUFFER_RESET) 340 + if (USE_BUFFER_RESET) 341 341 add_definitions("-DSDL_GPU_USE_BUFFER_RESET") 342 - endif (SDL_gpu_USE_BUFFER_RESET) 343 - if (SDL_gpu_USE_BUFFER_UPDATE) 342 + endif (USE_BUFFER_RESET) 343 + if (USE_BUFFER_UPDATE) 344 344 add_definitions("-DSDL_GPU_USE_BUFFER_UPDATE") 345 - endif (SDL_gpu_USE_BUFFER_UPDATE) 346 - if (SDL_gpu_USE_BUFFER_MAPPING) 345 + endif (USE_BUFFER_UPDATE) 346 + if (USE_BUFFER_MAPPING) 347 347 add_definitions("-DSDL_GPU_USE_BUFFER_MAPPING") 348 - endif (SDL_gpu_USE_BUFFER_MAPPING) 348 + endif (USE_BUFFER_MAPPING) 349 349 350 350 # Build the SDL_gpu library. 351 351 add_subdirectory(src) 352 352 353 - if(SDL_gpu_BUILD_DEMOS OR SDL_gpu_BUILD_TESTS OR SDL_gpu_BUILD_TOOLS) 353 + if(BUILD_DEMOS OR BUILD_TESTS OR BUILD_TOOLS) 354 354 add_library(test-common STATIC ${SDL_gpu_SOURCE_DIR}/common/common.c ${SDL_gpu_SOURCE_DIR}/common/demo-font.c) 355 355 set(TEST_LIBS test-common SDL_gpu) 356 - endif(SDL_gpu_BUILD_DEMOS OR SDL_gpu_BUILD_TESTS OR SDL_gpu_BUILD_TOOLS) 356 + endif(BUILD_DEMOS OR BUILD_TESTS OR BUILD_TOOLS) 357 357 358 358 # Build the demos 359 - if(SDL_gpu_BUILD_DEMOS) 359 + if(BUILD_DEMOS) 360 360 add_subdirectory(demos) 361 - endif(SDL_gpu_BUILD_DEMOS) 361 + endif(BUILD_DEMOS) 362 362 363 363 # Build the tests 364 - if(SDL_gpu_BUILD_TESTS) 365 - if(SDL_gpu_BUILD_VIDEO_TEST) 364 + if(BUILD_TESTS) 365 + if(BUILD_VIDEO_TEST) 366 366 367 367 find_package(FFMPEG REQUIRED) 368 368 include_directories(${FFMPEG_INCLUDE_DIR}) 369 369 link_libraries (${FFMPEG_LIBRARIES}) 370 370 371 371 add_definitions("-DSDL_GPU_BUILD_VIDEO_TEST") 372 - endif(SDL_gpu_BUILD_VIDEO_TEST) 372 + endif(BUILD_VIDEO_TEST) 373 373 374 374 add_subdirectory(tests) 375 - endif(SDL_gpu_BUILD_TESTS) 375 + endif(BUILD_TESTS) 376 376 377 377 # Build sample tools 378 - if(SDL_gpu_BUILD_TOOLS) 378 + if(BUILD_TOOLS) 379 379 add_subdirectory(tools) 380 - endif(SDL_gpu_BUILD_TOOLS) 380 + endif(BUILD_TOOLS) 381 381
+1 -1
demos/CMakeLists.txt
··· 1 1 include_directories (${SDL_gpu_SOURCE_DIR}) 2 2 link_directories (${SDL_gpu_SOURCE_DIR}/src) 3 3 4 - set(DEMO_LIBS SDL_gpu ${SDL_gpu_GL_LIBRARIES}) 4 + set(DEMO_LIBS SDL_gpu ${GL_LIBRARIES}) 5 5 6 6 if(MINGW) 7 7 set(DEMO_LIBS ${DEMO_LIBS} mingw32)
+2 -2
scripts/ios-cmake/toolchain/XcodeDefaults.cmake
··· 1 1 # This file is here to initial Xcode to better default settings. 2 2 3 - macro(SDL_gpu_CONFIGURE_XCODE_DEFAULTS _EXE_NAME) 3 + macro(CONFIGURE_XCODE_DEFAULTS _EXE_NAME) 4 4 5 5 # This iOS toolchain provides this convenience macro, but this is not in the mainline Mac, so let's define it. 6 6 if(APPLE AND NOT IOS) ··· 52 52 set_xcode_property(${_EXE_NAME} DEBUG_INFORMATION_FORMAT "dwarf-with-dsym") 53 53 54 54 endif(APPLE) 55 - endmacro(SDL_gpu_CONFIGURE_XCODE_DEFAULTS) 55 + endmacro(CONFIGURE_XCODE_DEFAULTS)
+31 -31
src/CMakeLists.txt
··· 63 63 ) 64 64 65 65 # Set the appropriate library name for the version of SDL used 66 - if ( SDL_gpu_USE_SDL1) 67 - set (SDL_gpu_OUTPUT_NAME "SDL_gpu") 68 - else ( SDL_gpu_USE_SDL1) 69 - set (SDL_gpu_OUTPUT_NAME "SDL2_gpu") 70 - endif ( SDL_gpu_USE_SDL1) 66 + if ( USE_SDL1) 67 + set (LIBRARY_OUTPUT_NAME "SDL_gpu") 68 + else ( USE_SDL1) 69 + set (LIBRARY_OUTPUT_NAME "SDL2_gpu") 70 + endif ( USE_SDL1) 71 71 72 - set (SDL_gpu_SHARED_OUTPUT ${SDL_gpu_OUTPUT_NAME}) 72 + set (SHARED_OUTPUT ${LIBRARY_OUTPUT_NAME}) 73 73 74 74 if(WIN32) 75 - set (SDL_gpu_STATIC_OUTPUT ${SDL_gpu_OUTPUT_NAME}_s) 75 + set (STATIC_OUTPUT ${LIBRARY_OUTPUT_NAME}_s) 76 76 else(WIN32) 77 - set (SDL_gpu_STATIC_OUTPUT ${SDL_gpu_OUTPUT_NAME}) 77 + set (STATIC_OUTPUT ${LIBRARY_OUTPUT_NAME}) 78 78 endif(WIN32) 79 79 80 80 if(MSVC) ··· 114 114 configure_file(${CMAKE_SOURCE_DIR}/README.md ${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/README.md COPYONLY) 115 115 116 116 # Build the shared library (.so or .dll) 117 - if(SDL_gpu_BUILD_SHARED) 117 + if(BUILD_SHARED) 118 118 add_library(SDL_gpu_shared SHARED 119 119 ${SDL_gpu_HDRS} 120 120 ${SDL_gpu_SRCS} 121 121 ) 122 122 123 - target_link_libraries(SDL_gpu_shared ${SDL_gpu_GL_LIBRARIES}) 123 + target_link_libraries(SDL_gpu_shared ${GL_LIBRARIES}) 124 124 125 - if(SDL_gpu_BUILD_FRAMEWORK) 125 + if(BUILD_FRAMEWORK) 126 126 if(NOT CMAKE_VERSION VERSION_LESS "3.1") 127 127 set_property(TARGET SDL_gpu_shared PROPERTY C_STANDARD 99) 128 128 endif() ··· 131 131 FRAMEWORK_VERSION "A" 132 132 PUBLIC_HEADER "${SDL_gpu_public_HDRS}" 133 133 #RESOURCE "${RESOURCE_FILES}" 134 - VERSION ${SDL_gpu_VERSION} 135 - SOVERSION ${SDL_gpu_VERSION} 136 - OUTPUT_NAME ${SDL_gpu_SHARED_OUTPUT} 134 + VERSION ${SDL_GPU_VERSION} 135 + SOVERSION ${SDL_GPU_VERSION} 136 + OUTPUT_NAME ${SHARED_OUTPUT} 137 137 ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/lib" 138 138 LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/lib" 139 139 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/bin" 140 140 ) 141 141 # Short Version is the "marketing version". It is the version 142 142 # the user sees in an information panel. 143 - SET(MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${SDL_gpu_VERSION}") 143 + SET(MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${SDL_GPU_VERSION}") 144 144 # Bundle version is the version the OS looks at. 145 - SET(MACOSX_FRAMEWORK_BUNDLE_VERSION "${SDL_gpu_VERSION}") 145 + SET(MACOSX_FRAMEWORK_BUNDLE_VERSION "${SDL_GPU_VERSION}") 146 146 SET(MACOSX_FRAMEWORK_IDENTIFIER "com.dinomage.sdl-gpu") 147 147 148 148 ··· 150 150 else() 151 151 if(ANDROID) 152 152 set_target_properties(SDL_gpu_shared PROPERTIES 153 - OUTPUT_NAME ${SDL_gpu_SHARED_OUTPUT} 153 + OUTPUT_NAME ${SHARED_OUTPUT} 154 154 CLEAN_DIRECT_OUTPUT 1 155 155 ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/lib" 156 156 LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/lib" ··· 158 158 ) 159 159 else() 160 160 set_target_properties(SDL_gpu_shared PROPERTIES 161 - OUTPUT_NAME ${SDL_gpu_SHARED_OUTPUT} 161 + OUTPUT_NAME ${SHARED_OUTPUT} 162 162 CLEAN_DIRECT_OUTPUT 1 163 - # VERSION ${SDL_gpu_VERSION} 163 + # VERSION ${SDL_GPU_VERSION} 164 164 ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/lib" 165 165 LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/lib" 166 166 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/bin" ··· 170 170 endif() 171 171 set_target_properties(SDL_gpu_shared PROPERTIES LINKER_LANGUAGE C) 172 172 if(APPLE) 173 - SDL_gpu_CONFIGURE_XCODE_DEFAULTS(SDL_gpu_shared) 173 + CONFIGURE_XCODE_DEFAULTS(SDL_gpu_shared) 174 174 endif() 175 175 endif() 176 176 177 177 # Build the static library (.a or .lib) 178 - if(SDL_gpu_BUILD_STATIC) 178 + if(BUILD_STATIC) 179 179 add_library(SDL_gpu STATIC 180 180 ${SDL_gpu_HDRS} 181 181 ${SDL_gpu_SRCS} ··· 184 184 set_property(TARGET SDL_gpu PROPERTY C_STANDARD 99) 185 185 endif() 186 186 set_target_properties(SDL_gpu PROPERTIES 187 - OUTPUT_NAME ${SDL_gpu_STATIC_OUTPUT} 187 + OUTPUT_NAME ${STATIC_OUTPUT} 188 188 CLEAN_DIRECT_OUTPUT 1 189 - VERSION ${SDL_gpu_VERSION} 189 + VERSION ${SDL_GPU_VERSION} 190 190 ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/lib" 191 191 LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/lib" 192 192 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DIR}/bin" 193 193 ) 194 194 set_target_properties(SDL_gpu PROPERTIES LINKER_LANGUAGE C) 195 195 if(APPLE) 196 - SDL_gpu_CONFIGURE_XCODE_DEFAULTS(SDL_gpu) 196 + CONFIGURE_XCODE_DEFAULTS(SDL_gpu) 197 197 endif() 198 198 endif() 199 199 ··· 201 201 source_group(Common FILES ${SDL_gpu_SRCS} ${SDL_gpu_HDRS}) 202 202 203 203 # Install the headers and library 204 - if(SDL_gpu_INSTALL) 205 - if(SDL_gpu_USE_SDL1) 204 + if(INSTALL_LIBRARY) 205 + if(USE_SDL1) 206 206 install(FILES ${SDL_gpu_public_HDRS} DESTINATION include/SDL) 207 - else(SDL_gpu_USE_SDL1) 207 + else(USE_SDL1) 208 208 install(FILES ${SDL_gpu_public_HDRS} DESTINATION include/SDL2) 209 - endif(SDL_gpu_USE_SDL1) 209 + endif(USE_SDL1) 210 210 211 - if(SDL_gpu_BUILD_SHARED) 211 + if(BUILD_SHARED) 212 212 install(TARGETS SDL_gpu_shared EXPORT SDL_gpu-targets DESTINATION lib) 213 213 endif() 214 - if(SDL_gpu_BUILD_STATIC) 214 + if(BUILD_STATIC) 215 215 install(TARGETS SDL_gpu EXPORT SDL_gpu-targets DESTINATION lib) 216 216 endif() 217 217 218 - endif(SDL_gpu_INSTALL) 218 + endif(INSTALL_LIBRARY)
+1 -1
tests/CMakeLists.txt
··· 2 2 include_directories (${SDL_gpu_SOURCE_DIR}/common) 3 3 link_directories (${SDL_gpu_SOURCE_DIR}/src) 4 4 5 - set(TEST_LIBS test-common SDL_gpu ${SDL_gpu_GL_LIBRARIES}) 5 + set(TEST_LIBS test-common SDL_gpu ${GL_LIBRARIES}) 6 6 7 7 if(MINGW) 8 8 set(TEST_LIBS ${TEST_LIBS} mingw32)
+1 -1
tools/CMakeLists.txt
··· 2 2 include_directories (${SDL_gpu_SOURCE_DIR}/common) 3 3 link_directories (${SDL_gpu_SOURCE_DIR}/src) 4 4 5 - set(TOOL_LIBS test-common SDL_gpu ${SDL_gpu_GL_LIBRARIES}) 5 + set(TOOL_LIBS test-common SDL_gpu ${GL_LIBRARIES}) 6 6 7 7 if(MINGW) 8 8 set(TOOL_LIBS ${TOOL_LIBS} mingw32)