Mercurial > malikania
annotate libcommon/CMakeLists.txt @ 36:9af360f34c7d
Misc: use raw duktape API
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 10 Aug 2016 14:30:51 +0200 |
parents | 3a6769c1d1e7 |
children | 702e0a2b9e5e |
rev | line source |
---|---|
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
1 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
2 # CMakeLists.txt -- CMake build system for malikania |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
3 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
4 # Copyright (c) 2013-2016 Malikania Authors |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
5 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
6 # Permission to use, copy, modify, and/or distribute this software for any |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
7 # purpose with or without fee is hereby granted, provided that the above |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
8 # copyright notice and this permission notice appear in all copies. |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
9 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
17 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
18 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
19 set( |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
20 HEADERS |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
21 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/application.hpp |
36
9af360f34c7d
Misc: use raw duktape API
David Demelier <markand@malikania.fr>
parents:
34
diff
changeset
|
22 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/duktape.hpp |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
23 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/elapsed-timer.hpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
24 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/game.hpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
25 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/id.hpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
26 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/js-elapsed-timer.hpp |
36
9af360f34c7d
Misc: use raw duktape API
David Demelier <markand@malikania.fr>
parents:
34
diff
changeset
|
27 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/js-resources-loader.hpp |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
28 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/resources-loader.hpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
29 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/resources-locator.hpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
30 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/util.hpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
31 ) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
32 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
33 set( |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
34 SOURCES |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
35 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/application.cpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
36 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/elapsed-timer.cpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
37 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/js-elapsed-timer.cpp |
36
9af360f34c7d
Misc: use raw duktape API
David Demelier <markand@malikania.fr>
parents:
34
diff
changeset
|
38 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/js-resources-loader.cpp |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
39 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/resources-loader.cpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
40 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/resources-locator.cpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
41 ${CMAKE_CURRENT_SOURCE_DIR}/malikania/util.cpp |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
42 ) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
43 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
44 if (WITH_BACKEND_SDL) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
45 find_package(SDL2 REQUIRED) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
46 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
47 list(APPEND HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/malikania/backend/sdl/common-sdl.hpp) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
48 list(APPEND SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/malikania/backend/sdl/common-sdl.cpp) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
49 list(APPEND INCLUDES ${SDL2_INCLUDE_DIRS}) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
50 list(APPEND LIBRARIES ${SDL2_LIBRARIES}) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
51 endif () |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
52 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
53 if (WIN32) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
54 list(APPEND LIBRARIES ws2_32) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
55 endif () |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
56 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
57 malikania_create_library( |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
58 PROJECT libcommon |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
59 TARGET libcommon |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
60 SOURCES ${HEADERS} ${SOURCES} |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
61 FLAGS "MALIKANIA_COMMON_BUILD" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
62 PUBLIC_INCLUDES |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
63 ${CMAKE_CURRENT_SOURCE_DIR} |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
64 ${INCLUDES} |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
65 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/malikania> |
34
3a6769c1d1e7
Misc: use nlohmann json, #520
David Demelier <markand@malikania.fr>
parents:
33
diff
changeset
|
66 LIBRARIES json ${LIBRARIES} |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
67 ) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
68 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
69 set_target_properties(libcommon PROPERTIES PREFIX "") |