annotate libclient/CMakeLists.txt @ 49:2804ae55c70f

CMake: big cleanup, closes #598
author David Demelier <markand@malikania.fr>
date Fri, 09 Dec 2016 13:28:45 +0100
parents 3be179ba3226
children 4bc4732fa1dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
49
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
19 project(libclient)
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
20
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
21 set(
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
22 HEADERS
49
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
23 ${libclient_SOURCE_DIR}/malikania/animation.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
24 ${libclient_SOURCE_DIR}/malikania/animator.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
25 ${libclient_SOURCE_DIR}/malikania/color.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
26 ${libclient_SOURCE_DIR}/malikania/font.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
27 ${libclient_SOURCE_DIR}/malikania/image.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
28 ${libclient_SOURCE_DIR}/malikania/line.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
29 ${libclient_SOURCE_DIR}/malikania/point.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
30 ${libclient_SOURCE_DIR}/malikania/rectangle.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
31 ${libclient_SOURCE_DIR}/malikania/size.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
32 ${libclient_SOURCE_DIR}/malikania/sprite.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
33 ${libclient_SOURCE_DIR}/malikania/window.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
34 ${libclient_SOURCE_DIR}/malikania/${WITH_BACKEND_DIR}/font_backend.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
35 ${libclient_SOURCE_DIR}/malikania/${WITH_BACKEND_DIR}/image_backend.hpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
36 ${libclient_SOURCE_DIR}/malikania/${WITH_BACKEND_DIR}/window_backend.hpp
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
37 )
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
38
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
39 set(
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
40 SOURCES
49
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
41 ${libclient_SOURCE_DIR}/malikania/animator.cpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
42 ${libclient_SOURCE_DIR}/malikania/client_resources_loader.cpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
43 ${libclient_SOURCE_DIR}/malikania/color.cpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
44 ${libclient_SOURCE_DIR}/malikania/font.cpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
45 ${libclient_SOURCE_DIR}/malikania/image.cpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
46 ${libclient_SOURCE_DIR}/malikania/sprite.cpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
47 ${libclient_SOURCE_DIR}/malikania/window.cpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
48 ${libclient_SOURCE_DIR}/malikania/${WITH_BACKEND_DIR}/font_backend.cpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
49 ${libclient_SOURCE_DIR}/malikania/${WITH_BACKEND_DIR}/image_backend.cpp
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
50 ${libclient_SOURCE_DIR}/malikania/${WITH_BACKEND_DIR}/window_backend.cpp
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
51 )
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
52
49
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
53 if (WITH_BACKEND MATCHES "SDL")
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
54 find_package(SDL2 REQUIRED)
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
55 find_package(SDL2_image REQUIRED)
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
56 find_package(SDL2_ttf REQUIRED)
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
57
49
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
58 list(
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
59 APPEND
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
60 INCLUDES
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
61 ${SDL2_INCLUDE_DIRS}
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
62 ${SDL2_IMAGE_INCLUDE_DIRS}
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
63 ${SDL2_TTF_INCLUDE_DIRS}
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
64 )
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
65 list(
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
66 APPEND
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
67 LIBRARIES
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
68 ${SDL2_LIBRARIES}
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
69 ${SDL2_IMAGE_LIBRARIES}
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
70 ${SDL2_TTF_LIBRARIES}
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
71 )
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
72 endif ()
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
73
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
74 malikania_define_library(
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
75 PROJECT libclient
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
76 TARGET libclient
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
77 SOURCES ${HEADERS} ${SOURCES}
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
78 PUBLIC_INCLUDES
49
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
79 $<BUILD_INTERFACE:${libclient_SOURCE_DIR}/malikania/${WITH_BACKEND_DIR}>
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
80 $<BUILD_INTERFACE:${libclient_SOURCE_DIR}/malikania>
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
81 ${INCLUDES}
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 48
diff changeset
82 LIBRARIES libcommon ${LIBRARIES}
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 30
diff changeset
83 )