Skip to content

Commit

Permalink
Merge pull request #540 from PeterBowman/cmake-if-unknown-arg
Browse files Browse the repository at this point in the history
Fix malformed if() check when collada is missing
  • Loading branch information
rdiankov authored Dec 17, 2017
2 parents 284027a + bfcdf60 commit b2818fb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -600,12 +600,14 @@ if( OPT_COLLADA )
#find_package(COLLADA_DOM 2.4 COMPONENTS 1.5 1.4 PATHS ${COLLADA_PATH})
find_package(COLLADA_DOM 2.3 COMPONENTS 1.5 PATHS ${COLLADA_PATH})

if( ${COLLADA_DOM_VERSION} VERSION_LESS "2.5.0" )
message(STATUS "collada version ${COLLADA_DOM_VERSION} does not support write to memory")
set(COLLADA_SUPPORT_WRITE_MEMORY 0)
else()
message(STATUS "collada version ${COLLADA_DOM_VERSION} supports write to memory")
set(COLLADA_SUPPORT_WRITE_MEMORY 1)
if( COLLADA_DOM_FOUND )
if( COLLADA_DOM_VERSION VERSION_LESS "2.5.0" )
message(STATUS "collada version ${COLLADA_DOM_VERSION} does not support write to memory")
set(COLLADA_SUPPORT_WRITE_MEMORY 0)
else()
message(STATUS "collada version ${COLLADA_DOM_VERSION} supports write to memory")
set(COLLADA_SUPPORT_WRITE_MEMORY 1)
endif()
endif()

find_package(ZLIB)
Expand Down

0 comments on commit b2818fb

Please sign in to comment.