CMakeLists.txt
changeset 8203 5c9ac454116e
parent 8197 7e9a477d3e07
child 8248 427d0a6f5af7
equal deleted inserted replaced
8202:b84a1f55075e 8203:5c9ac454116e
    35 set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
    35 set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
    36 
    36 
    37 # Calculate a libtool-like version number
    37 # Calculate a libtool-like version number
    38 math(EXPR LT_CURRENT "${SDL_MICRO_VERSION} - ${SDL_INTERFACE_AGE}")
    38 math(EXPR LT_CURRENT "${SDL_MICRO_VERSION} - ${SDL_INTERFACE_AGE}")
    39 math(EXPR LT_AGE "${SDL_BINARY_AGE} - ${SDL_INTERFACE_AGE}")
    39 math(EXPR LT_AGE "${SDL_BINARY_AGE} - ${SDL_INTERFACE_AGE}")
       
    40 math(EXPR LT_MAJOR "${LT_CURRENT}- ${LT_AGE}")
    40 set(LT_REVISION "${SDL_INTERFACE_AGE}")
    41 set(LT_REVISION "${SDL_INTERFACE_AGE}")
    41 set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}")
    42 set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}")
    42 set(LT_VERSION "${LT_CURRENT}.${LT_REVISION}.${LT_AGE}")
    43 set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}")
       
    44 
       
    45 message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}")
    43 
    46 
    44 # General settings & flags
    47 # General settings & flags
    45 set(LIBRARY_OUTPUT_DIRECTORY "build")
    48 set(LIBRARY_OUTPUT_DIRECTORY "build")
    46 # Check for 64 or 32 bit
    49 # Check for 64 or 32 bit
    47 set(SIZEOF_VOIDP ${CMAKE_SIZEOF_VOID_P})
    50 set(SIZEOF_VOIDP ${CMAKE_SIZEOF_VOID_P})
  1234 if(SDL_SHARED)
  1237 if(SDL_SHARED)
  1235   add_library(SDL2 SHARED ${SOURCE_FILES})
  1238   add_library(SDL2 SHARED ${SOURCE_FILES})
  1236   if(UNIX)
  1239   if(UNIX)
  1237     set_target_properties(SDL2 PROPERTIES
  1240     set_target_properties(SDL2 PROPERTIES
  1238       VERSION ${LT_VERSION}
  1241       VERSION ${LT_VERSION}
  1239       SOVERSION ${LT_CURRENT}
  1242       SOVERSION ${LT_REVISION}
  1240       OUTPUT_NAME "SDL2-${LT_RELEASE}")
  1243       OUTPUT_NAME "SDL2-${LT_RELEASE}")
  1241   else(UNIX)
  1244   else(UNIX)
  1242     set_target_properties(SDL2 PROPERTIES
  1245     set_target_properties(SDL2 PROPERTIES
  1243       VERSION ${SDL_VERSION}
  1246       VERSION ${SDL_VERSION}
  1244       SOVERSION ${LT_CURRENT}
  1247       SOVERSION ${LT_REVISION}
  1245       OUTPUT_NAME "SDL2")
  1248       OUTPUT_NAME "SDL2")
  1246   endif()
  1249   endif()
  1247  set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
  1250  set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
  1248  target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
  1251  target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
  1249 endif()
  1252 endif()