From 22d026ac40269457a1d093b3013f656129b331ea Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 11 May 2014 13:56:38 +0200 Subject: [PATCH] update: add asset importer lib cmake find macro. --- cmake-modules/Findassimp.cmake | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 cmake-modules/Findassimp.cmake diff --git a/cmake-modules/Findassimp.cmake b/cmake-modules/Findassimp.cmake new file mode 100644 index 000000000..21779cf5d --- /dev/null +++ b/cmake-modules/Findassimp.cmake @@ -0,0 +1,25 @@ +FIND_PATH( + assimp_INCLUDE_DIRS + NAMES postprocess.h scene.h version.h config.h cimport.h + PATHS /usr/local/include/btr-headers +) + +FIND_LIBRARY( + assimp_LIBRARIES + NAMES assimp + PATHS /usr/local/lib/ +) + +IF (assimp_INCLUDE_DIRS AND assimp_LIBRARIES) + SET(assimp_FOUND TRUE) +ENDIF (assimp_INCLUDE_DIRS AND assimp_LIBRARIES) + +IF (assimp_FOUND) + IF (NOT assimp_FIND_QUIETLY) + MESSAGE(STATUS "Found asset importer library: ${assimp_LIBRARIES}") + ENDIF (NOT assimp_FIND_QUIETLY) +ELSE (assimp_FOUND) + IF (assimp_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find asset importer library") + ENDIF (assimp_FIND_REQUIRED) +ENDIF (assimp_FOUND)