From e4cd1583cc7263bb92241499a98b76c3761b9704 Mon Sep 17 00:00:00 2001 From: Calum Robinson Date: Mon, 23 Jul 2018 10:37:40 +0100 Subject: [PATCH] Fix FindCollada.cmake for vcpkg installs * Handle MSVC_VERSION versions > 1910 * Specify PATH_SUFFIXES rather than individual PATHS for FIND_PATH --- CMakeModules/FindCOLLADA.cmake | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/CMakeModules/FindCOLLADA.cmake b/CMakeModules/FindCOLLADA.cmake index 8c9c2fc33..b8ca7cf5f 100644 --- a/CMakeModules/FindCOLLADA.cmake +++ b/CMakeModules/FindCOLLADA.cmake @@ -25,11 +25,11 @@ ENDIF() IF(APPLE) SET(COLLADA_BUILDNAME "mac") - SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME}) + SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME}) ELSEIF(MINGW) SET(COLLADA_BUILDNAME "mingw") - SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME}) -ELSEIF(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910 ) + SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME}) +ELSEIF(MSVC_VERSION GREATER_EQUAL 1900 ) SET(COLLADA_BUILDNAME "vc14") SET(COLLADA_BOOST_BUILDNAME "vc140") ELSEIF(MSVC_VERSION EQUAL 1800) @@ -58,6 +58,7 @@ ENDIF() FIND_PATH(COLLADA_INCLUDE_DIR dae.h + PATHS ${COLLADA_DOM_ROOT}/include $ENV{COLLADA_DIR}/include $ENV{COLLADA_DIR} @@ -65,27 +66,19 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h /Library/Frameworks /opt/local/Library/Frameworks #macports /usr/local/include - /usr/local/include/colladadom - /usr/local/include/collada-dom - /usr/local/include/collada-dom2.5 - /usr/local/include/collada-dom2.4 - /usr/local/include/collada-dom2.2 - /opt/local/include/collada-dom - /opt/local/include/collada-dom2.5 - /opt/local/include/collada-dom2.4 - /opt/local/include/collada-dom2.2 /usr/include/ - /usr/include/colladadom - /usr/include/collada-dom - /usr/include/collada-dom2.5 - /usr/include/collada-dom2.4 - /usr/include/collada-dom2.2 /sw/include # Fink /opt/local/include # DarwinPorts /opt/csw/include # Blastwave /opt/include /usr/freeware/include ${ACTUAL_3DPARTY_DIR}/include + PATH_SUFFIXES + colladadom + collada-dom + collada-dom2.5 + collada-dom2.4 + collada-dom2.2 ) FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY