misc/libphysfs/CMakeLists.txt
branchphysfslayer
changeset 8540 cf808329bb6f
parent 8526 9f2bd885d773
child 8542 dc511bf91aa0
equal deleted inserted replaced
8538:0e113487c4b2 8540:cf808329bb6f
   251     option(PHYSFS_BUILD_SHARED "Build shared library" FALSE)
   251     option(PHYSFS_BUILD_SHARED "Build shared library" FALSE)
   252 endif(WINDOWS)
   252 endif(WINDOWS)
   253 
   253 
   254 if(PHYSFS_BUILD_STATIC)
   254 if(PHYSFS_BUILD_STATIC)
   255     add_library(physfs STATIC ${PHYSFS_SRCS})
   255     add_library(physfs STATIC ${PHYSFS_SRCS})
   256     set_target_properties(physfs PROPERTIES OUTPUT_NAME "physfs")
   256     set_target_properties(physfs PROPERTIES OUTPUT_NAME ${physfs_output_name}) ##
   257     set(lib_prefix ${CMAKE_STATIC_LIBRARY_PREFIX}) ##
   257     set(lib_prefix ${CMAKE_STATIC_LIBRARY_PREFIX}) ##
   258     set(lib_suffix ${CMAKE_STATIC_LIBRARY_SUFFIX}) ##
   258     set(lib_suffix ${CMAKE_STATIC_LIBRARY_SUFFIX}) ##
   259 endif(PHYSFS_BUILD_STATIC)
   259 endif(PHYSFS_BUILD_STATIC)
   260 
   260 
   261 if(PHYSFS_BUILD_SHARED)
   261 if(PHYSFS_BUILD_SHARED)
   262     add_library(physfs SHARED ${PHYSFS_SRCS})
   262     add_library(physfs SHARED ${PHYSFS_SRCS})
   263     set_target_properties(physfs PROPERTIES VERSION ${PHYSFS_VERSION})
   263     set_target_properties(physfs PROPERTIES VERSION ${PHYSFS_VERSION})
   264     set_target_properties(physfs PROPERTIES SOVERSION ${PHYSFS_SOVERSION})
   264     set_target_properties(physfs PROPERTIES SOVERSION ${PHYSFS_SOVERSION})
       
   265     set_target_properties(physfs PROPERTIES OUTPUT_NAME ${physfs_output_name}) ##
   265     target_link_libraries(physfs ${optional_library_libs} ${OTHER_LDFLAGS})
   266     target_link_libraries(physfs ${optional_library_libs} ${OTHER_LDFLAGS})
   266     install(TARGETS physfs RUNTIME DESTINATION ${target_library_install_dir}) ##
   267     install(TARGETS physfs RUNTIME DESTINATION ${target_library_install_dir}) ##
   267     set(lib_prefix ${CMAKE_SHARED_LIBRARY_PREFIX}) ##
   268     set(lib_prefix ${CMAKE_SHARED_LIBRARY_PREFIX}) ##
   268     set(lib_suffix ${CMAKE_SHARED_LIBRARY_SUFFIX}) ##
   269     set(lib_suffix ${CMAKE_SHARED_LIBRARY_SUFFIX}) ##
   269 endif(PHYSFS_BUILD_SHARED)
   270 endif(PHYSFS_BUILD_SHARED)
   277     set_target_properties(physfs PROPERTIES CLEAN_DIRECT_OUTPUT 1)
   278     set_target_properties(physfs PROPERTIES CLEAN_DIRECT_OUTPUT 1)
   278 endif(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)
   279 endif(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)
   279 
   280 
   280 ## added standard variables emulating the FindPhysFS.cmake ones (FORCE or cmake won't pick 'em)
   281 ## added standard variables emulating the FindPhysFS.cmake ones (FORCE or cmake won't pick 'em)
   281 set(PHYSFS_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/misc/libphysfs/ CACHE STRING "" FORCE)
   282 set(PHYSFS_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/misc/libphysfs/ CACHE STRING "" FORCE)
   282 set(PHYSFS_LIBRARY ${LIBRARY_OUTPUT_PATH}/${lib_prefix}physfs${lib_suffix} CACHE STRING "" FORCE)
   283 set(PHYSFS_LIBRARY ${LIBRARY_OUTPUT_PATH}/${lib_prefix}${physfs_output_name}${lib_suffix} CACHE STRING "" FORCE)
   283 
   284 
   284 ## this is to avoid find_package() find the just built library and shadowing it at next cmake run
   285 ## this is to avoid find_package() find the just built library and shadowing it at next cmake run
   285 set(PHYSFS_BUNDLE TRUE CACHE STRING "" FORCE)
   286 set(PHYSFS_BUNDLE TRUE CACHE STRING "" FORCE)
   286 
   287 
   287 
   288