author | unc0rr |
Sat, 04 Jan 2014 23:55:54 +0400 | |
branch | webgl |
changeset 9950 | 2759212a27de |
parent 9270 | a9b9ebd3d3be |
parent 9650 | 1c7c87ce37fd |
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 |
||
9270 | 7 |
|
8526 | 8 |
set(PHYSLAYER_SRCS |
9 |
physfsrwops.c |
|
10 |
physfslualoader.c |
|
11 |
hwpacksmounter.c |
|
12 |
) |
|
13 |
||
9202
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
14 |
#compiles and links actual library |
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
15 |
add_library (physlayer ${PHYSLAYER_SRCS}) |
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
16 |
#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
|
17 |
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
|
18 |
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
|
19 |
LIBRARY DESTINATION ${target_library_install_dir} |
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
20 |
ARCHIVE DESTINATION ${target_library_install_dir}) |
4d69569baabb
also physlayer can be comiled as static or shared now
koda
parents:
8526
diff
changeset
|
21 |
get_target_property(physlayer_fullpath physlayer LOCATION) |
8526 | 22 |
|
23 |
||
24 |
## 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
|
25 |
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
|
26 |
set(PHYSLAYER_LIBRARY ${physlayer_fullpath} CACHE STRING "Physlayer library" FORCE) |
8526 | 27 |