author | koda |
Wed, 12 Jun 2013 01:00:47 +0200 | |
changeset 9202 | 4d69569baabb |
parent 8526 | 9f2bd885d773 |
child 9225 | d8d929f92633 |
permissions | -rw-r--r-- |
8526 | 1 |
|
2 |
find_package(SDL REQUIRED) |
|
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 |
|
10 |
physfsrwops.c |
|
11 |
physfslualoader.c |
|
12 |
hwpacksmounter.c |
|
13 |
) |
|
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 |
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
18 |
target_link_libraries(physlayer ${SDL_LIBRARY} ${LUA_LIBRARY} ${PHYSFS_LIBRARY}) |
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 | 23 |
|
24 |
||
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 | 28 |