misc/libphyslayer/CMakeLists.txt
author Wuzzy <almikes@aol.com>
Sat, 09 Apr 2016 23:13:33 +0200
changeset 12014 9937075bbfd5
parent 11659 71bdf987e41f
child 12124 ffc7bb9fde01
permissions -rw-r--r--
HedgeEditor: Make all hog and team names translatable and export them properly Uses the new loc_noop from Locale
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11374
28c309f45269 libphyslayer: Support SDL2 only
koda
parents: 11362
diff changeset
     1
find_package(SDL2 REQUIRED)
8526
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     2
11374
28c309f45269 libphyslayer: Support SDL2 only
koda
parents: 11362
diff changeset
     3
include_directories(${SDL2_INCLUDE_DIR})
8526
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     4
include_directories(${PHYSFS_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
9270
a9b9ebd3d3be frontend compiles
koda
parents: 9225
diff changeset
     7
8526
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
     8
set(PHYSLAYER_SRCS
9991
3858d99476f5 add compatibility for physicsfs 2.0
sheepluva
parents: 9650
diff changeset
     9
    physfscompat.c
8526
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
9202
4d69569baabb also physlayer can be comiled as static or shared now
koda
parents: 8526
diff changeset
    15
#compiles and links actual library
4d69569baabb also physlayer can be comiled as static or shared now
koda
parents: 8526
diff changeset
    16
add_library (physlayer ${PHYSLAYER_SRCS})
4d69569baabb also physlayer can be comiled as static or shared now
koda
parents: 8526
diff changeset
    17
#TODO: find good VERSION and SOVERSION values
11374
28c309f45269 libphyslayer: Support SDL2 only
koda
parents: 11362
diff changeset
    18
target_link_libraries(physlayer ${SDL2_LIBRARY} lua physfs)
9202
4d69569baabb also physlayer can be comiled as static or shared now
koda
parents: 8526
diff changeset
    19
install(TARGETS physlayer RUNTIME DESTINATION ${target_binary_install_dir}
4d69569baabb also physlayer can be comiled as static or shared now
koda
parents: 8526
diff changeset
    20
                          LIBRARY DESTINATION ${target_library_install_dir}
4d69569baabb also physlayer can be comiled as static or shared now
koda
parents: 8526
diff changeset
    21
                          ARCHIVE DESTINATION ${target_library_install_dir})
4d69569baabb also physlayer can be comiled as static or shared now
koda
parents: 8526
diff changeset
    22
get_target_property(physlayer_fullpath physlayer LOCATION)
8526
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    23
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
## added standard variables (FORCE or cmake won't pick 'em)
9202
4d69569baabb also physlayer can be comiled as static or shared now
koda
parents: 8526
diff changeset
    26
set(PHYSLAYER_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Physlayer include dir" FORCE)
4d69569baabb also physlayer can be comiled as static or shared now
koda
parents: 8526
diff changeset
    27
set(PHYSLAYER_LIBRARY ${physlayer_fullpath} CACHE STRING "Physlayer library" FORCE)
8526
9f2bd885d773 update cmake files to use the two libraries independently
koda
parents:
diff changeset
    28
11659
71bdf987e41f Fully support emscripten toolchain in our build system
koda
parents: 11374
diff changeset
    29
if(BUILD_ENGINE_JS)
71bdf987e41f Fully support emscripten toolchain in our build system
koda
parents: 11374
diff changeset
    30
    set_target_properties(physlayer PROPERTIES SUFFIX ".bc")
71bdf987e41f Fully support emscripten toolchain in our build system
koda
parents: 11374
diff changeset
    31
endif()
71bdf987e41f Fully support emscripten toolchain in our build system
koda
parents: 11374
diff changeset
    32