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 (2 weeks, 2 days 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

# User Rev Content
1 greg 1.10 # RCSid $Id$
2    
3 greg 1.1 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 greg 1.7 set(LIB_M)
10 greg 1.1 endif()
11    
12     include_directories(common)
13 greg 1.2 # 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 greg 1.8 -DRADIANCE_VERSION="${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_TWEAK}"
19 greg 1.7 -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 greg 1.2 )
41 greg 1.7 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 greg 1.2 endmacro()
45 greg 1.1 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 greg 1.9 if(NOT BUILD_HEADLESS AND BUILD_QT)
56 greg 1.6 # only use qtrvu if qt5 is found
57 greg 1.7 add_subdirectory(qtrvu)
58 greg 1.1 endif()