remove rna func scene.collada_export(), export functions dont exist for any other...
[blender-staging.git] / source / blender / makesrna / intern / CMakeLists.txt
index e9fc5c10f9eed9ed036c0574ee0dc0a136c02881..ecb0d903ae6caee480c08057d2f9efb3991da1c8 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id: CMakeLists.txt 17433 2008-11-12 21:16:53Z blendix $
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 #
 # ***** END GPL LICENSE BLOCK *****
 
-FILE(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
-FILE(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c")
-LIST(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c)
-LIST(REMOVE_ITEM DEFSRC ${APISRC})
+# Generated code has some unused vars we can ignore.
+remove_strict_flags()
+
+# message(STATUS "Configuring makesrna")
+
+file(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
+file(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c")
+list(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c)
+list(REMOVE_ITEM DEFSRC ${APISRC})
  
-STRING(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
+string(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
+set_source_files_properties(GENSRC PROPERTIES GENERATED true)
 
-SET(SRC
-               makesrna.c
-               rna_define.c
-               ${DEFSRC}
-               ${APISRC}
-               ../../../../intern/guardedalloc/intern/mallocn.c
-               ../../../../intern/guardedalloc/intern/mmap_win.c)
 
-INCLUDE_DIRECTORIES(../../../../intern/audaspace/intern ../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../ikplugin ../../windowmanager ../../editors/include ../../gpu ../../imbuf ../../render/extern/include .)
-FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
+set(SRC
+       makesrna.c
+       rna_define.c
+       ${DEFSRC}
+       ${APISRC}
+       ../../../../intern/guardedalloc/intern/mallocn.c
+       ../../../../intern/guardedalloc/intern/mmap_win.c
+)
+
+blender_include_dirs(
+       ../../../../intern/audaspace/intern
+       ../../../../intern/guardedalloc
+       ../../../../intern/memutil
+       ..
+       ../../makesdna
+       ../../blenkernel
+       ../../blenlib
+       ../../blenfont
+       ../../ikplugin
+       ../../windowmanager
+       ../../editors/include
+       ../../gpu
+       ../../imbuf
+       ../../render/extern/include
+       ../../../../extern/glew/include
+       .
+)
 
-IF(NOT WITH_PYTHON)
-       ADD_DEFINITIONS(-DDISABLE_PYTHON)
-ENDIF(NOT WITH_PYTHON)
+file(GLOB INC_FILES ../*.h ../../makesdna/*.h)
 
-IF(WIN32)
-       SET(INC ${INC} ${PTHREADS_INC})
-ENDIF(WIN32)
+if(WITH_PYTHON)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-IF(WITH_GAMEENGINE)
-       ADD_DEFINITIONS(-DGAMEBLENDER)
-ENDIF(WITH_GAMEENGINE)
+if(WITH_GAMEENGINE)
+       add_definitions(-DWITH_GAMEENGINE)
+endif()
 
-IF(WITH_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_definitions(-DWITH_OPENEXR)
+endif()
 
-IF(WITH_TIFF)
-       ADD_DEFINITIONS(-DWITH_TIFF)
-ENDIF(WITH_TIFF)
+if(WITH_IMAGE_TIFF)
+       add_definitions(-DWITH_TIFF)
+endif()
 
-IF(WITH_OPENJPEG)
-       ADD_DEFINITIONS(-DWITH_OPENJPEG)
-ENDIF(WITH_OPENJPEG)
+if(WITH_IMAGE_OPENJPEG)
+       add_definitions(-DWITH_OPENJPEG)
+endif()
 
-IF(WITH_DDS)
-       ADD_DEFINITIONS(-DWITH_DDS)
-ENDIF(WITH_DDS)
+if(WITH_IMAGE_DDS)
+       add_definitions(-DWITH_DDS)
+endif()
 
-IF(WITH_QUICKTIME)
-       SET(INC ${INC} ../../quicktime)
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_QUICKTIME)
+if(WITH_IMAGE_CINEON)
+       add_definitions(-DWITH_CINEON)
+endif()
 
-IF(WITH_FFMPEG)
-       SET(INC ${INC} ${FFMPEG_INC})
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
-ENDIF(WITH_FFMPEG)
+if(WITH_IMAGE_HDR)
+       add_definitions(-DWITH_HDR)
+endif()
 
-IF(NOT WITH_ELBEEM)
-       ADD_DEFINITIONS(-DDISABLE_ELBEEM)
-ENDIF(NOT WITH_ELBEEM)
+if(WITH_CODEC_QUICKTIME)
+       list(APPEND INC ../../quicktime)
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(WITH_FFTW3)
-       ADD_DEFINITIONS(-DFFTW3=1)
-ENDIF(WITH_FFTW3)
+if(WITH_CODEC_FFMPEG)
+       list(APPEND INC ${FFMPEG_INC})
+       add_definitions(-DWITH_FFMPEG)
+endif()
 
-IF(WITH_SDL)
-       ADD_DEFINITIONS(-DWITH_SDL)
-ENDIF(WITH_SDL)
+if(WITH_LCMS)
+       list(APPEND INC ${LCMS_INCLUDE_DIR})
+       add_definitions(-DWITH_LCMS)
+endif()
 
-IF(WITH_OPENAL)
-       ADD_DEFINITIONS(-DWITH_OPENAL)
-ENDIF(WITH_OPENAL)
+if(NOT WITH_MOD_FLUID)
+       add_definitions(-DDISABLE_ELBEEM)
+endif()
 
-IF(WITH_JACK)
-       ADD_DEFINITIONS(-DWITH_JACK)
-ENDIF(WITH_JACK)
+if(WITH_FFTW3)
+       add_definitions(-DFFTW3=1)
+endif()
+
+if(WITH_SDL)
+       add_definitions(-DWITH_SDL)
+endif()
+
+if(WITH_OPENAL)
+       add_definitions(-DWITH_OPENAL)
+endif()
+
+if(WITH_JACK)
+       add_definitions(-DWITH_JACK)
+endif()
 
 # Build makesrna executable
-ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
-TARGET_LINK_LIBRARIES(makesrna bf_dna)
+add_executable(makesrna ${SRC} ${INC_FILES})
+target_link_libraries(makesrna bf_dna)
 
 # Output rna_*_gen.c
 # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes
-ADD_CUSTOM_COMMAND(
+add_custom_command(
        OUTPUT ${GENSRC}
        COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
        DEPENDS makesrna
 )
 
 # Build bf_rna
-SET(SRC rna_access.c ${GENSRC})
-BLENDERLIB(bf_rna "${SRC}" "${INC}")
+set(SRC
+       rna_access.c
+       ${GENSRC}
+
+       ../RNA_access.h
+       ../RNA_define.h
+       ../RNA_enum_types.h
+       ../RNA_types.h
+
+       rna_internal.h
+       rna_internal_types.h
+       rna_nodetree_types.h
+)
 
-MESSAGE(STATUS "Configuring makesrna")
+blender_add_lib(bf_rna "${SRC}" "${INC}")