2010-08-31 01:39:08 +00:00
|
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
|
2007-04-17 08:49:19 +00:00
|
|
|
|
PROJECT(NV)
|
2009-03-14 07:27:25 +00:00
|
|
|
|
ENABLE_TESTING()
|
2007-04-17 08:49:19 +00:00
|
|
|
|
|
|
|
|
|
SET(NV_CMAKE_DIR "${NV_SOURCE_DIR}/cmake")
|
|
|
|
|
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NV_CMAKE_DIR}")
|
|
|
|
|
|
2020-04-26 12:23:47 +00:00
|
|
|
|
# Compiler check (needs -std:c++11 flag)
|
|
|
|
|
include(CheckCXXCompilerFlag)
|
|
|
|
|
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
|
|
|
|
if(COMPILER_SUPPORTS_CXX11)
|
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
|
else()
|
|
|
|
|
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
|
|
|
|
|
endif()
|
2015-03-24 02:05:33 +00:00
|
|
|
|
|
2007-04-17 08:49:19 +00:00
|
|
|
|
IF(WIN32)
|
2009-03-01 00:18:47 +00:00
|
|
|
|
# gnuwin32 paths:
|
2020-04-14 01:01:33 +00:00
|
|
|
|
#SET(GNUWIN32_PATH "${NV_SOURCE_DIR}/extern/gnuwin32")
|
|
|
|
|
#SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${GNUWIN32_PATH}/include")
|
|
|
|
|
#SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${GNUWIN32_PATH}/lib")
|
2009-01-27 23:39:33 +00:00
|
|
|
|
|
2009-03-01 00:18:47 +00:00
|
|
|
|
# Set GLUT path:
|
2020-04-14 01:01:33 +00:00
|
|
|
|
#SET(GLUT_ROOT_DIR "${NV_SOURCE_DIR}/extern/glut")
|
2009-03-01 00:18:47 +00:00
|
|
|
|
|
2009-11-03 23:55:38 +00:00
|
|
|
|
# Set FreeImage path:
|
2020-04-14 01:01:33 +00:00
|
|
|
|
#SET(FREEIMAGE_ROOT_DIR "${NV_SOURCE_DIR}/extern/FreeImage")
|
2007-04-17 08:49:19 +00:00
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
2007-08-21 06:32:52 +00:00
|
|
|
|
INCLUDE(${NV_CMAKE_DIR}/OptimalOptions.cmake)
|
|
|
|
|
MESSAGE(STATUS "Setting optimal options")
|
|
|
|
|
MESSAGE(STATUS " Processor: ${NV_SYSTEM_PROCESSOR}")
|
|
|
|
|
MESSAGE(STATUS " Compiler Flags: ${CMAKE_CXX_FLAGS}")
|
2007-04-17 08:49:19 +00:00
|
|
|
|
|
2015-12-05 23:19:59 +00:00
|
|
|
|
IF(CMAKE_BUILD_TYPE MATCHES "debug")
|
2018-02-06 02:55:07 +00:00
|
|
|
|
SET(CMAKE_DEBUG_POSTFIX "_d" CACHE STRING "Postfix for debug build libraries.")
|
2017-02-15 19:11:44 +00:00
|
|
|
|
ADD_DEFINITIONS(-D_DEBUG=1)
|
2015-12-05 23:19:59 +00:00
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
2020-04-14 01:01:33 +00:00
|
|
|
|
#IF(NVTT_SHARED)
|
|
|
|
|
# SET(NVCORE_SHARED TRUE)
|
|
|
|
|
# SET(NVMATH_SHARED TRUE)
|
|
|
|
|
# SET(NVIMAGE_SHARED TRUE)
|
|
|
|
|
#ENDIF(NVTT_SHARED)
|
2008-11-21 09:08:00 +00:00
|
|
|
|
|
2009-03-01 00:18:47 +00:00
|
|
|
|
ADD_SUBDIRECTORY(extern)
|
2008-11-21 09:08:00 +00:00
|
|
|
|
|
2007-04-17 08:49:19 +00:00
|
|
|
|
ADD_SUBDIRECTORY(src)
|
2009-03-14 06:04:33 +00:00
|
|
|
|
|
2009-03-16 06:05:51 +00:00
|
|
|
|
# These files should only be installed when creating packages.
|
2009-03-14 06:04:33 +00:00
|
|
|
|
INSTALL(FILES
|
2016-09-14 10:14:58 +00:00
|
|
|
|
LICENSE
|
|
|
|
|
README.md
|
2009-03-16 06:05:51 +00:00
|
|
|
|
DESTINATION share/doc/nvtt)
|
2009-03-14 06:04:33 +00:00
|
|
|
|
|
|
|
|
|
# Add packaging support
|
|
|
|
|
INCLUDE(InstallRequiredSystemLibraries)
|
2009-03-15 18:35:00 +00:00
|
|
|
|
|
|
|
|
|
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
|
SET(CPACK_GENERATOR "TGZ;DEB")
|
|
|
|
|
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
|
|
2009-03-14 06:04:33 +00:00
|
|
|
|
SET(CPACK_PACKAGE_NAME "nvidia-texture-tools")
|
2009-11-03 23:55:38 +00:00
|
|
|
|
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
|
|
|
|
|
SET(CPACK_PACKAGE_VERSION_MINOR "1")
|
|
|
|
|
SET(CPACK_PACKAGE_VERSION_PATCH "0")
|
2009-03-14 06:04:33 +00:00
|
|
|
|
SET(CPACK_PACKAGE_VERSION "2.1.0")
|
2016-09-19 19:53:33 +00:00
|
|
|
|
SET(CPACK_PACKAGE_CONTACT "Ignacio Casta<74>o <castano@gmail.com>")
|
|
|
|
|
#SET(CPACK_PACKAGE_VENDOR "NVIDIA Corporation")
|
|
|
|
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Texture processing tools with support for Direct3D 10 and 11 formats.")
|
2009-03-14 06:04:33 +00:00
|
|
|
|
|
2016-09-14 10:14:58 +00:00
|
|
|
|
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${NV_SOURCE_DIR}/README.md")
|
|
|
|
|
SET(CPACK_RESOURCE_FILE_LICENSE "${NV_SOURCE_DIR}/LICENSE")
|
2009-03-14 08:02:47 +00:00
|
|
|
|
|
2009-11-03 23:55:38 +00:00
|
|
|
|
# NSIS options:
|
|
|
|
|
IF(WIN32)
|
|
|
|
|
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_VENDOR}\\\\NVIDIA Texture Tools 2.1")
|
|
|
|
|
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\NVIDIA Texture Tools 2.1")
|
|
|
|
|
SET(CPACK_PACKAGE_ICON "${NV_SOURCE_DIR}\\\\project\\\\vc8\\\\nvcompress\\\\nvidia.ico")
|
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
2009-03-14 06:04:33 +00:00
|
|
|
|
INCLUDE(CPack)
|
2015-03-24 02:05:33 +00:00
|
|
|
|
|