1 # $Id: CMakeLists.txt 17433 2008-11-12 21:16:53Z blendix $
2 # ***** BEGIN GPL LICENSE BLOCK *****
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
21 # The Original Code is: all of this file.
23 # Contributor(s): Jacques Beaurain.
25 # ***** END GPL LICENSE BLOCK *****
27 FILE(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
28 FILE(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c")
29 LIST(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c)
30 LIST(REMOVE_ITEM DEFSRC ${APISRC})
32 STRING(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
39 ../../../../intern/guardedalloc/intern/mallocn.c
40 ../../../../intern/guardedalloc/intern/mmap_win.c)
43 ../../../../intern/audaspace/intern
44 ../../../../intern/guardedalloc
45 ../../../../intern/memutil
55 ../../render/extern/include
56 ../../../../extern/glew/include
59 FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
62 ADD_DEFINITIONS(-DDISABLE_PYTHON)
63 ENDIF(NOT WITH_PYTHON)
66 LIST(APPEND INC ${PTHREADS_INC})
70 ADD_DEFINITIONS(-DGAMEBLENDER)
71 ENDIF(WITH_GAMEENGINE)
73 IF(WITH_IMAGE_OPENEXR)
74 ADD_DEFINITIONS(-DWITH_OPENEXR)
75 ENDIF(WITH_IMAGE_OPENEXR)
78 ADD_DEFINITIONS(-DWITH_TIFF)
79 ENDIF(WITH_IMAGE_TIFF)
81 IF(WITH_IMAGE_OPENJPEG)
82 ADD_DEFINITIONS(-DWITH_OPENJPEG)
83 ENDIF(WITH_IMAGE_OPENJPEG)
86 ADD_DEFINITIONS(-DWITH_DDS)
90 ADD_DEFINITIONS(-DWITH_CINEON)
91 ENDIF(WITH_IMAGE_CINEON)
94 ADD_DEFINITIONS(-DWITH_HDR)
98 LIST(APPEND INC ../../quicktime)
99 ADD_DEFINITIONS(-DWITH_QUICKTIME)
100 ENDIF(WITH_QUICKTIME)
103 LIST(APPEND INC ${FFMPEG_INC})
104 ADD_DEFINITIONS(-DWITH_FFMPEG)
108 LIST(APPEND INC ${LCMS_INCLUDE_DIR})
109 ADD_DEFINITIONS(-DWITH_LCMS)
113 ADD_DEFINITIONS(-DDISABLE_ELBEEM)
114 ENDIF(NOT WITH_FLUID)
117 ADD_DEFINITIONS(-DFFTW3=1)
121 ADD_DEFINITIONS(-DWITH_SDL)
125 ADD_DEFINITIONS(-DWITH_OPENAL)
129 ADD_DEFINITIONS(-DWITH_JACK)
132 # Build makesrna executable
133 ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
134 TARGET_LINK_LIBRARIES(makesrna bf_dna)
137 # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes
140 COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
145 SET(SRC rna_access.c ${GENSRC})
146 BLENDERLIB(bf_rna "${SRC}" "${INC}")
148 MESSAGE(STATUS "Configuring makesrna")