ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/CMakeLists.txt
Revision: 1.10
Committed: Thu Jul 24 01:24:01 2025 UTC (7 days, 20 hours ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +2 -0 lines
Log Message:
chore: Added version string to all CMakeLists.txt files

File Contents

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