Skip to content

Commit 9d00c18

Browse files
author
kimmi
committed
Feature : Prepare FindPackage feature.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1251 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
1 parent 8441ecf commit 9d00c18

3 files changed

+35
-0
lines changed

AssimpBuildTreeSettings.cmake.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set(ASSIMP_INCLUDE_DIRS
2+
"@PROJECT_SOURCE_DIR@"
3+
"@PROJECT_BINARY_DIR@")

AssimpConfig.cmake.in

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# - Config file for the FooBar package
2+
# It defines the following variables
3+
# FOOBAR_INCLUDE_DIRS - include directories for FooBar
4+
# FOOBAR_LIBRARIES - libraries to link against
5+
# FOOBAR_EXECUTABLE - the bar executable
6+
7+
# Compute paths
8+
get_filename_component(FOOBAR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
9+
if(EXISTS "${FOOBAR_CMAKE_DIR}/CMakeCache.txt")
10+
# In build tree
11+
include("${FOOBAR_CMAKE_DIR}/FooBarBuildTreeSettings.cmake")
12+
else()
13+
set(FOOBAR_INCLUDE_DIRS "${FOOBAR_CMAKE_DIR}/@CONF_REL_INCLUDE_DIR@")
14+
endif()
15+
16+
# Our library dependencies (contains definitions for IMPORTED targets)
17+
include("${FOOBAR_CMAKE_DIR}/FooBarLibraryDepends.cmake")
18+
19+
# These are IMPORTED targets created by FooBarLibraryDepends.cmake
20+
set(FOOBAR_LIBRARIES foo)
21+
set(FOOBAR_EXECUTABLE bar)

AssimpConfigVersion.cmake.in

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
set(PACKAGE_VERSION "@ASSIMP_SOVERSION@")
2+
3+
# Check whether the requested PACKAGE_FIND_VERSION is compatible
4+
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
5+
set(PACKAGE_VERSION_COMPATIBLE FALSE)
6+
else()
7+
set(PACKAGE_VERSION_COMPATIBLE TRUE)
8+
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
9+
set(PACKAGE_VERSION_EXACT TRUE)
10+
endif()
11+
endif()

0 commit comments

Comments
 (0)