misc/libphyslayer/CMakeLists.txt
author nemo
Thu, 28 Feb 2013 23:15:33 -0500
changeset 8617 e7bea88096d2
parent 8526 9f2bd885d773
child 9202 4d69569baabb
permissions -rw-r--r--
So. A while ago, while trying to prevent hogs blowtorching getting turned around, unc0rr altered the old range of blowtorch from 1/8th of 180° up or down, to a 4° gain in upwards and a -4° loss in downwards. He also made it so that starting tunnels could fail to erase sufficient terrain, trapping hogs. Here are a couple of workarounds to more closely approximate old behaviour (do some initial erasure, adjust min/max angles)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8526
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     1
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     2
find_package(SDL REQUIRED)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     3
include_directories(${PHYSFS_INCLUDE_DIR})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     4
include_directories(${SDL_INCLUDE_DIR})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     5
include_directories(${LUA_INCLUDE_DIR})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     6
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     7
## extra functions needed by Hedgewars
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     8
## TODO: maybe it's better to have them in a separate library?
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     9
set(PHYSLAYER_SRCS
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    10
    physfsrwops.c
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    11
    physfslualoader.c
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    12
    hwpacksmounter.c
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    13
)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    14
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    15
set(build_type STATIC)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    16
set(lib_prefix ${CMAKE_STATIC_LIBRARY_PREFIX})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    17
set(lib_suffix ${CMAKE_STATIC_LIBRARY_SUFFIX})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    18
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    19
if(WIN32)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    20
    set(build_type SHARED)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    21
    set(lib_prefix ${CMAKE_SHARED_LIBRARY_PREFIX})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    22
    set(lib_suffix ${CMAKE_SHARED_LIBRARY_SUFFIX})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    23
endif(WIN32)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    24
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    25
#compiles and links actual library
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    26
add_library (physlayer ${build_type} ${PHYSLAYER_SRCS})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    27
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    28
if(WIN32)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    29
    target_link_libraries(physlayer ${SDL_LIBRARY} ${LUA_LIBRARY} ${PHYSFS_LIBRARY})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    30
    install(TARGETS physlayer RUNTIME DESTINATION ${target_library_install_dir})
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    31
endif()
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    32
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    33
## added standard variables (FORCE or cmake won't pick 'em)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    34
set(PHYSLAYER_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/misc/libphyslayer/ CACHE STRING "" FORCE)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    35
set(PHYSLAYER_LIBRARY ${LIBRARY_OUTPUT_PATH}/${lib_prefix}physlayer${lib_suffix} CACHE STRING "" FORCE)
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    36