CMakeLists.txt
changeset 12355 a46837d71c0a
parent 12258 231245d461a2
child 12391 ca6e41ade79a
     1.1 --- a/CMakeLists.txt	Tue Oct 23 12:40:25 2018 -0700
     1.2 +++ b/CMakeLists.txt	Thu Oct 25 11:11:02 2018 +0300
     1.3 @@ -46,6 +46,9 @@
     1.4  set(SDL_INTERFACE_AGE 0)
     1.5  set(SDL_BINARY_AGE 9)
     1.6  set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
     1.7 +# the following should match the versions in Xcode project file:
     1.8 +set(DYLIB_CURRENT_VERSION 10.0.0)
     1.9 +set(DYLIB_COMPATIBILITY_VERSION 1.0.0)
    1.10  
    1.11  # Set defaults preventing destination file conflicts
    1.12  set(SDL_CMAKE_DEBUG_POSTFIX "d"
    1.13 @@ -451,6 +454,8 @@
    1.14  
    1.15    if(APPLE)
    1.16      list(APPEND EXTRA_LDFLAGS "-Wl,-undefined,error")
    1.17 +    list(APPEND EXTRA_LDFLAGS "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}")
    1.18 +    list(APPEND EXTRA_LDFLAGS "-Wl,-current_version,${DYLIB_CURRENT_VERSION}")
    1.19    else()
    1.20      set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
    1.21      check_c_compiler_flag("" HAVE_NO_UNDEFINED)