misc/libphyslayer/CMakeLists.txt
author sheepluva
Thu, 11 Dec 2014 01:24:27 +0100
changeset 10650 7f23971bd9db
parent 10015 4feced261c68
child 11362 ed5a6478e710
permissions -rw-r--r--
fix some old code that assumes that a bullet under water is always outside land array - which is wrong (e.g. during sudden-death in previous releases, also weSea now) also removed usage of Gear^.Damage after "if Gear^.Damage > 0 then Gear^.Damage:= 0;"


find_package(SDL1or2)
include_directories(${PHYSFS_INCLUDE_DIR})
include_directories(${SDL_INCLUDE_DIR})
include_directories(${LUA_INCLUDE_DIR})


set(PHYSLAYER_SRCS
    physfscompat.c
    physfsrwops.c
    physfslualoader.c
    hwpacksmounter.c
)

#compiles and links actual library
add_library (physlayer ${PHYSLAYER_SRCS})
#TODO: find good VERSION and SOVERSION values
target_link_libraries(physlayer ${SDL_LIBRARY} lua physfs)
install(TARGETS physlayer RUNTIME DESTINATION ${target_binary_install_dir}
                          LIBRARY DESTINATION ${target_library_install_dir}
                          ARCHIVE DESTINATION ${target_library_install_dir})
get_target_property(physlayer_fullpath physlayer LOCATION)


## added standard variables (FORCE or cmake won't pick 'em)
set(PHYSLAYER_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Physlayer include dir" FORCE)
set(PHYSLAYER_LIBRARY ${physlayer_fullpath} CACHE STRING "Physlayer library" FORCE)