Cleanup: remove contributors for CMake files
[blender.git] / source / blender / datatoc / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public LicenseS
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # ***** END GPL LICENSE BLOCK *****
17
18
19 # -----------------------------------------------------------------------------
20 # Build datatoc executable
21 set(SRC
22         datatoc.c
23 )
24
25 # SRC_DNA_INC is defined in the parent dir
26 add_executable(datatoc ${SRC})
27
28
29 # -----------------------------------------------------------------------------
30 # Build datatoc_icon executable
31
32 if(NOT WITH_HEADLESS)
33
34         set(SRC
35                 datatoc_icon.c
36         )
37         setup_platform_linker_flags()
38         if(WIN32)
39                 include_directories(
40                         ../blenlib
41                         ../../../intern/utfconv
42                 )
43
44                 # for winstuff_dir.c
45                 add_definitions(-DUSE_STANDALONE)
46
47                 list(APPEND SRC
48                         ../blenlib/intern/winstuff_dir.c
49                         ../../../intern/utfconv/utfconv.c
50                 )
51
52         endif()
53
54         include_directories(${PNG_INCLUDE_DIRS})
55         link_directories(${PNG_LIBPATH} ${ZLIB_LIBPATH})
56
57         add_executable(datatoc_icon ${SRC})
58
59         target_link_libraries(datatoc_icon ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
60         # PNG library uses pow() and floow(), so seems -lm is required for proper
61         # workign binary.
62         if(UNIX AND NOT APPLE)
63                 target_link_libraries(datatoc_icon m)
64         endif()
65 endif()