cmake: Add FindASSIMP.cmake

This find module addresses the problem raised by debian (non-sid) and
Ubuntu (and possibly other distributions) that don't install the cmake
config files.

This FindModule will try to use a config file, but will fall back to
using find_library if it can't.

It will unset any variables provided by the config that the find path
wont also expose.
This commit is contained in:
Dylan Baker 2016-03-16 15:02:12 -07:00
parent bc90df5a9b
commit 35275bf8ef
2 changed files with 57 additions and 1 deletions

View file

@ -18,7 +18,7 @@ IF(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_USE_PLATFORM_WIN32_KHR")
ELSE(WIN32)
find_library(VULKAN_LIB NAMES libvulkan.so PATHS ${CMAKE_SOURCE_DIR}/libs/vulkan)
find_package(ASSIMP REQUIRED CONFIG)
find_package(ASSIMP REQUIRED)
find_package(XCB REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_USE_PLATFORM_XCB_KHR")
# Todo : android?