2011-01-13 22:59:29 +08:00
|
|
|
# Locate nvidia-texture-tools
|
|
|
|
# This module defines
|
|
|
|
# NVTT_LIBRARY
|
|
|
|
# NVTT_FOUND, if false, do not try to link to nvtt
|
|
|
|
# NVTT_INCLUDE_DIR, where to find the headers
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
FIND_PATH(NVTT_INCLUDE_DIR nvtt/nvtt.h
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES include
|
|
|
|
)
|
|
|
|
|
2013-07-23 13:25:39 +08:00
|
|
|
# NVTT
|
2018-01-11 04:32:07 +08:00
|
|
|
FIND_LIBRARY(NVTT_LIBRARY_RELEASE
|
2011-01-13 22:59:29 +08:00
|
|
|
NAMES nvtt
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
2013-07-23 13:25:39 +08:00
|
|
|
FIND_LIBRARY(NVTT_LIBRARY_DEBUG
|
|
|
|
NAMES nvtt_d
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
|
|
|
# NVIMAGE
|
2018-01-11 04:32:07 +08:00
|
|
|
FIND_LIBRARY(NVIMAGE_LIBRARY_RELEASE
|
2011-01-13 22:59:29 +08:00
|
|
|
NAMES nvimage
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
2013-07-23 13:25:39 +08:00
|
|
|
FIND_LIBRARY(NVIMAGE_LIBRARY_DEBUG
|
|
|
|
NAMES nvimage_d
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
|
|
|
# NVMATH
|
2018-01-11 04:32:07 +08:00
|
|
|
FIND_LIBRARY(NVMATH_LIBRARY_RELEASE
|
2011-01-13 22:59:29 +08:00
|
|
|
NAMES nvmath
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
2013-07-23 13:25:39 +08:00
|
|
|
FIND_LIBRARY(NVMATH_LIBRARY_DEBUG
|
|
|
|
NAMES nvmath_d
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
|
|
|
# NVCORE
|
2018-01-11 04:32:07 +08:00
|
|
|
FIND_LIBRARY(NVCORE_LIBRARY_RELEASE
|
2011-01-13 22:59:29 +08:00
|
|
|
NAMES nvcore
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
2013-07-23 13:25:39 +08:00
|
|
|
FIND_LIBRARY(NVCORE_LIBRARY_DEBUG
|
|
|
|
NAMES nvcore_d
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
2016-12-22 01:02:05 +08:00
|
|
|
# NVTHREAD
|
2018-01-11 04:32:07 +08:00
|
|
|
FIND_LIBRARY(NVTHREAD_LIBRARY_RELEASE
|
2016-12-22 01:02:05 +08:00
|
|
|
NAMES nvthread
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
FIND_LIBRARY(NVTHREAD_LIBRARY_DEBUG
|
|
|
|
NAMES nvthread_d
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
|
|
|
# SQUISH
|
2018-01-11 04:32:07 +08:00
|
|
|
FIND_LIBRARY(NVSQUISH_LIBRARY_RELEASE
|
2016-12-22 01:02:05 +08:00
|
|
|
NAMES squish
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
FIND_LIBRARY(NVSQUISH_LIBRARY_DEBUG
|
|
|
|
NAMES squish_d
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
|
|
|
# BC6H
|
2018-01-11 04:32:07 +08:00
|
|
|
FIND_LIBRARY(NVBC6H_LIBRARY_RELEASE
|
2016-12-22 01:02:05 +08:00
|
|
|
NAMES bc6h
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
FIND_LIBRARY(NVBC6H_LIBRARY_DEBUG
|
|
|
|
NAMES bc6h_d
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
|
|
|
|
# BC7
|
2018-01-11 04:32:07 +08:00
|
|
|
FIND_LIBRARY(NVBC7_LIBRARY_RELEASE
|
2016-12-22 01:02:05 +08:00
|
|
|
NAMES bc7
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
|
|
|
FIND_LIBRARY(NVBC7_LIBRARY_DEBUG
|
|
|
|
NAMES bc7_d
|
|
|
|
PATHS
|
|
|
|
/usr/local
|
|
|
|
/usr
|
|
|
|
$ENV{NVTT_DIR}
|
|
|
|
${3rdPartyRoot}
|
|
|
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
|
|
|
)
|
2013-07-23 13:25:39 +08:00
|
|
|
|
2018-01-11 18:10:43 +08:00
|
|
|
IF (WIN32)
|
|
|
|
SET(LIBS_TO_SETUP "NVTT" "NVCORE" "NVMATH" "NVIMAGE" "NVTHREAD" "NVBC7" "NVBC6H" "NVSQUISH")
|
|
|
|
ELSE()
|
|
|
|
SET(LIBS_TO_SETUP "NVTT" "NVCORE" "NVMATH" "NVIMAGE")
|
|
|
|
ENDIF()
|
|
|
|
|
2013-07-23 13:25:39 +08:00
|
|
|
|
2018-01-11 04:32:07 +08:00
|
|
|
FOREACH(LIB ${LIBS_TO_SETUP})
|
|
|
|
IF(${LIB}_LIBRARY_DEBUG)
|
|
|
|
SET(${LIB}_LIBRARIES optimized ${${LIB}_LIBRARY_RELEASE} debug ${${LIB}_LIBRARY_DEBUG})
|
|
|
|
ELSE(${LIB}_LIBRARY_DEBUG)
|
|
|
|
SET(${LIB}_LIBRARY_DEBUG ${${LIB}_LIBRARY_RELEASE})
|
|
|
|
SET(${LIB}_LIBRARIES optimized ${${LIB}_LIBRARY_RELEASE} debug ${${LIB}_LIBRARY_DEBUG})
|
|
|
|
ENDIF(${LIB}_LIBRARY_DEBUG)
|
|
|
|
ENDFOREACH(LIB ${LIBS_TO_SETUP})
|
|
|
|
|
|
|
|
SET(NVTT_LIBRARIES
|
|
|
|
${NVTT_LIBRARIES}
|
|
|
|
${NVCORE_LIBRARIES}
|
|
|
|
${NVMATH_LIBRARIES}
|
|
|
|
${NVIMAGE_LIBRARIES}
|
|
|
|
${NVTHREAD_LIBRARIES}
|
|
|
|
${NVBC7_LIBRARIES}
|
|
|
|
${NVBC6H_LIBRARIES}
|
|
|
|
${NVSQUISH_LIBRARIES}
|
|
|
|
)
|
2011-01-13 22:59:29 +08:00
|
|
|
|
|
|
|
SET(NVTT_FOUND "NO")
|
2018-01-11 04:32:07 +08:00
|
|
|
IF(NVTT_LIBRARY_RELEASE AND NVTT_INCLUDE_DIR)
|
|
|
|
SET(NVTT_FOUND "YES" )
|
|
|
|
ENDIF(NVTT_LIBRARY_RELEASE AND NVTT_INCLUDE_DIR)
|