1 |
|
cmake_minimum_required(VERSION 2.8.4) |
2 |
|
project("radiance") |
3 |
|
|
4 |
+ |
if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.11") |
5 |
+ |
cmake_policy(SET CMP0020 NEW) |
6 |
+ |
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.0") |
7 |
+ |
cmake_policy(SET CMP0042 NEW) |
8 |
+ |
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.1") |
9 |
+ |
cmake_policy(SET CMP0054 NEW) |
10 |
+ |
endif() |
11 |
+ |
endif() |
12 |
+ |
endif() |
13 |
+ |
|
14 |
|
enable_testing() |
15 |
|
include(CTest) |
16 |
|
|
28 |
|
|
29 |
|
# call git log to get output containing the tag |
30 |
|
execute_process( |
31 |
< |
COMMAND ${git} branch |
31 |
> |
COMMAND ${git} describe --tag --exact-match |
32 |
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
33 |
< |
OUTPUT_VARIABLE git_log_output) |
33 |
> |
OUTPUT_VARIABLE git_tag_output) |
34 |
|
|
35 |
|
# create & install the source version .txt file |
36 |
< |
file(WRITE "NREL_ver.txt" "Radiance built from source branch(*):\n ${git_log_output}") |
36 |
> |
file(WRITE "NREL_ver.txt" "Radiance version ${git_tag_output}") |
37 |
|
install(FILES NREL_ver.txt DESTINATION bin/..) |
38 |
|
endif() |
39 |
|
|
75 |
|
INCLUDE(radianceCPack.cmake ) |
76 |
|
ENDIF( BUILD_PACKAGE ) |
77 |
|
|
78 |
< |
set(CPACK_PACKAGE_VERSION_MAJOR 4) |
79 |
< |
set(CPACK_PACKAGE_VERSION_MINOR 2) |
80 |
< |
set(CPACK_PACKAGE_VERSION_PATCH a) |
78 |
> |
set(CPACK_PACKAGE_VERSION_MAJOR 5) |
79 |
> |
set(CPACK_PACKAGE_VERSION_MINOR 0) |
80 |
> |
set(CPACK_PACKAGE_VERSION_PATCH a.7) |
81 |
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Radiance") |
82 |
|
SET(CPACK_RESOURCE_FILE_WELCOME "${radiance_SOURCE_DIR}/Welcome.txt") |
83 |
|
SET(CPACK_RESOURCE_FILE_README "${radiance_SOURCE_DIR}/README.txt") |
87 |
|
include(CPack) |
88 |
|
|
89 |
|
if(NOT BUILD_HEADLESS) |
90 |
< |
find_package(Qt4 COMPONENTS QtCore QtGui) |
90 |
> |
find_package(Qt5Widgets) |
91 |
|
find_package(X11) |
92 |
|
endif() |
93 |
|
|