ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/CMakeLists.txt
Revision: 1.8
Committed: Wed Jun 20 20:51:24 2018 UTC (5 years, 8 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R2, rad5R3
Changes since 1.7: +1 -1 lines
Log Message:
Updates to package installers from Rob G.

File Contents

# Content
1 if(UNIX)
2 find_library(LIB_M m DOC "Path to libm")
3 if(NOT LIB_M)
4 message(FATAL_ERROR "Cannot build radiance without libm. Please set LIB_M")
5 endif()
6 else()
7 set(LIB_M)
8 endif()
9
10 include_directories(common)
11 # create a macro to generate
12 macro(create_version_file version_file)
13 add_custom_command(
14 OUTPUT "${version_file}"
15 COMMAND "${CMAKE_COMMAND}"
16 -DRADIANCE_VERSION="${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_TWEAK}"
17 -DVERSION_OUT_FILE="${version_file}"
18 -DVERSION_IN_FILE="${radiance_SOURCE_DIR}/src/rt/VERSION"
19 -DVERSION_GOLD="${radiance_SOURCE_DIR}/src/rt/Version.c"
20 -P "${radiance_SOURCE_DIR}/src/rt/create_version.cmake"
21 )
22 endmacro()
23 macro(install_without_extension)
24 foreach(file IN ITEMS ${ARGN})
25 string(REGEX REPLACE "\\.[^.]*$" "" file_we ${file})
26 install(PROGRAMS "${file}"
27 DESTINATION "bin"
28 RENAME "${file_we}"
29 )
30 endforeach()
31 endmacro()
32 macro(install_and_copy_without_extension)
33 foreach(file IN ITEMS ${ARGN})
34 string(REGEX REPLACE "\\.[^.]*$" "" file_we ${file})
35 install(PROGRAMS "${file}"
36 DESTINATION "bin"
37 RENAME ${file_we}
38 )
39 file(COPY "${file}" DESTINATION "${CMAKE_BINARY_DIR}/bin")
40 file(RENAME "${CMAKE_BINARY_DIR}/bin/${file}" "${CMAKE_BINARY_DIR}/bin/${file_we}")
41 endforeach()
42 endmacro()
43 add_subdirectory(common)
44 add_subdirectory(cal)
45 add_subdirectory(cv)
46 add_subdirectory(gen)
47 add_subdirectory(hd)
48 add_subdirectory(meta)
49 add_subdirectory(ot)
50 add_subdirectory(px)
51 add_subdirectory(rt)
52 add_subdirectory(util)
53 if(NOT BUILD_HEADLESS AND Qt5Widgets_DIR)
54 # only use qtrvu if qt5 is found
55 add_subdirectory(qtrvu)
56 endif()