FasTC/CMakeModules/FasTCConfig.cmake.in
Pavel Krajcevski fb7805d875 Bring CMake integration up to date.
- Add a way to generate a FasTCConfig.cmake file so that you can
use cmake without having to install it.
- Add install paths for users that want to install it.
- Hide all public headers in FasTC/ qualified include path, this way we
know what files are public directly from the source. Also, it lets us
define build-tree and install-tree include directories a lot easier.
2014-11-18 17:07:26 -05:00

30 lines
981 B
CMake

SET(FASTC_VERSION @FasTC_VERSION@)
@PACKAGE_INIT@
SET(FasTC_LIBRARIES FasTCBase FasTCIO FasTCCore BPTCEncoder PVRTCEncoder DXTEncoder ETCEncoder ASTCEncoder)
IF(NOT TARGET FasTCBase)
# We're coming from a build tree -- include all of the targets
# from the project and try to make sure that our includes are set properly
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FasTCTargets.cmake")
FOREACH(LIB ${FasTC_LIBRARIES})
STRING(REPLACE "FasTC" "" DIR "${LIB}")
SET(CURRENT_DIR "${CMAKE_CURRENT_LIST_DIR}/${DIR}/include")
IF( EXISTS "${CURRENT_DIR}/" )
SET(FasTC_INCLUDE_DIRS ${FasTC_INCLUDE_DIRS} ${CURRENT_DIR})
ENDIF()
ENDFOREACH()
SET(FasTC_EXECUTABLES tc compare decomp)
ELSE()
# This is an install tree -- everything should be a lot easier....
SET_AND_CHECK(FasTC_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@/FasTC")
SET_AND_CHECK(FasTC_BIN_DIR "@PACKAGE_BIN_INSTALL_DIR@")
SET_AND_CHECK(FasTC_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@")
ENDIF()