CMakeLists.txt
changeset 12355 a46837d71c0a
parent 12258 231245d461a2
child 12391 ca6e41ade79a
equal deleted inserted replaced
12354:7846ac86d46e 12355:a46837d71c0a
    44 set(SDL_MINOR_VERSION 0)
    44 set(SDL_MINOR_VERSION 0)
    45 set(SDL_MICRO_VERSION 9)
    45 set(SDL_MICRO_VERSION 9)
    46 set(SDL_INTERFACE_AGE 0)
    46 set(SDL_INTERFACE_AGE 0)
    47 set(SDL_BINARY_AGE 9)
    47 set(SDL_BINARY_AGE 9)
    48 set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
    48 set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
       
    49 # the following should match the versions in Xcode project file:
       
    50 set(DYLIB_CURRENT_VERSION 10.0.0)
       
    51 set(DYLIB_COMPATIBILITY_VERSION 1.0.0)
    49 
    52 
    50 # Set defaults preventing destination file conflicts
    53 # Set defaults preventing destination file conflicts
    51 set(SDL_CMAKE_DEBUG_POSTFIX "d"
    54 set(SDL_CMAKE_DEBUG_POSTFIX "d"
    52     CACHE STRING "Name suffix for debug builds")
    55     CACHE STRING "Name suffix for debug builds")
    53 
    56 
   449     list(APPEND EXTRA_CFLAGS "-Wshadow")
   452     list(APPEND EXTRA_CFLAGS "-Wshadow")
   450   endif()
   453   endif()
   451 
   454 
   452   if(APPLE)
   455   if(APPLE)
   453     list(APPEND EXTRA_LDFLAGS "-Wl,-undefined,error")
   456     list(APPEND EXTRA_LDFLAGS "-Wl,-undefined,error")
       
   457     list(APPEND EXTRA_LDFLAGS "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}")
       
   458     list(APPEND EXTRA_LDFLAGS "-Wl,-current_version,${DYLIB_CURRENT_VERSION}")
   454   else()
   459   else()
   455     set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
   460     set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
   456     check_c_compiler_flag("" HAVE_NO_UNDEFINED)
   461     check_c_compiler_flag("" HAVE_NO_UNDEFINED)
   457     set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
   462     set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
   458     if(HAVE_NO_UNDEFINED)
   463     if(HAVE_NO_UNDEFINED)