Jelajahi Sumber

add openddl_parser directly to assimp.

Signed-off-by: Kim Kulling <[email protected]>
Kim Kulling 10 tahun lalu
induk
melakukan
12efa14777
3 mengubah file dengan 19 tambahan dan 5 penghapusan
  1. 0 4
      CMakeLists.txt
  2. 18 0
      code/CMakeLists.txt
  3. 1 1
      tools/assimp_cmd/CMakeLists.txt

+ 0 - 4
CMakeLists.txt

@@ -156,10 +156,6 @@ else(NOT ZLIB_FOUND)
 endif(NOT ZLIB_FOUND)
 INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
 
-add_subdirectory( contrib/openddlparser )
-INCLUDE_DIRECTORIES( contrib/openddlparser/include )
-SET( OPENDDL_PARSER_LIBRARIES openddl_parser )
-
 # Search for unzip
 if (PKG_CONFIG_FOUND)
     PKG_CHECK_MODULES(UNZIP minizip)

+ 18 - 0
code/CMakeLists.txt

@@ -640,6 +640,18 @@ SET( unzip_SRCS
 )
 SOURCE_GROUP( unzip FILES ${unzip_SRCS})
 
+SET ( openddl_parser_SRCS
+    ../contrib/openddlparser/code/OpenDDLParser.cpp
+    ../contrib/openddlparser/code/DDLNode.cpp
+    ../contrib/openddlparser/code/Value.cpp
+    ../contrib/openddlparser/include/openddlparser/OpenDDLParser.h
+    ../contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h
+    ../contrib/openddlparser/include/openddlparser/OpenDDLCommon.h
+    ../contrib/openddlparser/include/openddlparser/DDLNode.h
+    ../contrib/openddlparser/include/openddlparser/Value.h
+)
+SOURCE_GROUP( openddl_parser FILES ${openddl_parser_SRCS})
+
 # VC2010 fixes
 if(MSVC10)
 	option( VC10_STDINT_FIX "Fix for VC10 Compiler regarding pstdint.h redefinition errors" OFF )
@@ -719,6 +731,7 @@ SET( assimp_src
 	${unzip_compile_SRCS}
 	${Poly2Tri_SRCS}
 	${Clipper_SRCS}
+    ${openddl_parser_SRCS}
 	# Necessary to show the headers in the project when using the VC++ generator:
 	${Boost_SRCS}
 
@@ -730,6 +743,11 @@ SET( assimp_src
 	# Moreover it's a drag to recompile assimp entirely each time a modification is made to one of the included header, which is definitely counter-productive.)
 	AssimpPCH.cpp
 )
+add_definitions( -DOPENDDLPARSER_BUILD )
+
+INCLUDE_DIRECTORIES( 
+    ../contrib/openddlparser/include
+)
 
 IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
 	SET( assimp_src ${assimp_src} ${C4D_SRCS})

+ 1 - 1
tools/assimp_cmd/CMakeLists.txt

@@ -28,7 +28,7 @@ IF( WIN32 )
 		MAIN_DEPENDENCY assimp)
 ENDIF( WIN32 )
 
-TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES} openddl_parser)
+TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES} )
 SET_TARGET_PROPERTIES( assimp_cmd PROPERTIES
 	OUTPUT_NAME assimp
 )