author | koda |
Fri, 17 Jan 2014 18:17:47 +0100 | |
changeset 10008 | b8b91c7e0da8 |
parent 9991 | 3858d99476f5 |
child 10015 | 4feced261c68 |
permissions | -rw-r--r-- |
8526 | 1 |
|
9650 | 2 |
find_package(SDL1or2) |
8526 | 3 |
include_directories(${PHYSFS_INCLUDE_DIR}) |
4 |
include_directories(${SDL_INCLUDE_DIR}) |
|
5 |
include_directories(${LUA_INCLUDE_DIR}) |
|
6 |
||
7 |
## extra functions needed by Hedgewars |
|
8 |
## TODO: maybe it's better to have them in a separate library? |
|
9 |
set(PHYSLAYER_SRCS |
|
9991 | 10 |
physfscompat.c |
8526 | 11 |
physfsrwops.c |
12 |
physfslualoader.c |
|
13 |
hwpacksmounter.c |
|
14 |
) |
|
15 |
||
9202
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
16 |
#compiles and links actual library |
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
17 |
add_library (physlayer ${PHYSLAYER_SRCS}) |
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
18 |
#TODO: find good VERSION and SOVERSION values |
9225
d8d929f92633
use target name instead of the resulting library, use more macros around
koda
parents:
9202
diff
changeset
|
19 |
target_link_libraries(physlayer ${SDL_LIBRARY} lua physfs) |
9202
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
20 |
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
|
21 |
LIBRARY DESTINATION ${target_library_install_dir} |
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
22 |
ARCHIVE DESTINATION ${target_library_install_dir}) |
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
23 |
get_target_property(physlayer_fullpath physlayer LOCATION) |
8526 | 24 |
|
25 |
||
26 |
## 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
|
27 |
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
|
28 |
set(PHYSLAYER_LIBRARY ${physlayer_fullpath} CACHE STRING "Physlayer library" FORCE) |
8526 | 29 |