From 12efa1477720011b64e6ff7021d12e6b3958d468 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 19 Mar 2015 11:37:58 +0100 Subject: [PATCH] add openddl_parser directly to assimp. Signed-off-by: Kim Kulling --- CMakeLists.txt | 4 ---- code/CMakeLists.txt | 18 ++++++++++++++++++ tools/assimp_cmd/CMakeLists.txt | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 231166824..8a3a325be 100644 --- a/CMakeLists.txt +++ b/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) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 3286d4a1d..e14215838 100644 --- a/code/CMakeLists.txt +++ b/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}) diff --git a/tools/assimp_cmd/CMakeLists.txt b/tools/assimp_cmd/CMakeLists.txt index 78b3139ee..6857a0ba2 100644 --- a/tools/assimp_cmd/CMakeLists.txt +++ b/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 )