ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/CMakeLists.txt
(Generate patch)

Comparing ray/CMakeLists.txt (file contents):
Revision 1.21 by greg, Wed Jun 20 20:51:24 2018 UTC vs.
Revision 1.27 by greg, Tue May 16 22:58:18 2023 UTC

# Line 30 | Line 30 | option(BUILD_SHARED_LIBS "Build radiance using shared
30   option(BUILD_HEADLESS "Build radiance without any GUI components?" OFF)
31   option(BUILD_PABOPTO_UTILS "Build PABOpto Utilities?" OFF)
32   option(BUILD_LIBTIFF "Build libtiff?" OFF)
33 + option(BUILD_QT "Build Qt related stuff?" OFF)
34  
35   if(NOT WIN32)
36    set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 1)
37    install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/doc/man/" DESTINATION man)
38 <  set(qt_plugin_term "PLUGIN")
38 >  if(BUILD_QT)
39 >    set(qt_plugin_term "PLUGIN")
40 >  endif()
41   endif()
42  
43   if(WIN32)
44 +  set(CPACK_NSIS_INSTALL_ROOT "C:")
45    set(CPACK_NSIS_MODIFY_PATH 1)
46 <  set(qt_plugin_term "LIBRARY")
46 >  if(BUILD_QT)
47 >    set(qt_plugin_term "LIBRARY")
48 >  endif()
49  
50    # Set RAYPATH on install
51    set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
# Line 77 | Line 83 | if(BUILD_LIBTIFF)
83        URL_MD5 ${LIBTIFF_MD5}
84        CMAKE_GENERATOR "NMake Makefiles"
85        CMAKE_ARGS
86 +        "-UHAVE_UNISTD_H"
87          "-DBUILD_SHARED_LIBS=OFF"
88          "-DCMAKE_BUILD_TYPE=Release"
89          "-Dzlib=OFF"
# Line 116 | Line 123 | endif()
123   include(CPack)
124  
125   if(NOT BUILD_HEADLESS)
126 <  find_package(Qt5Widgets)
127 <  get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
128 <  get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
129 <  get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/.." ABSOLUTE)
126 >  if(BUILD_QT)
127 >    find_package(Qt5Widgets)
128 >    get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
129 >    get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
130 >    get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/.." ABSOLUTE)
131 >  endif()
132    find_package(X11)
133    if(APPLE)
134       include_directories(${X11_INCLUDE_DIR})
# Line 130 | Line 139 | set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
139  
140   if(MSVC)
141    add_definitions(/MP)
142 +  # Suppress warnings about double-to-float assignments and initializations
143 +  add_compile_options(/wd"4244" /wd"4305")
144   endif()
145   if(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
146    set(_INTEL_WINDOWS 1)
# Line 150 | Line 161 | add_subdirectory(resources)
161   install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
162    DESTINATION "lib"
163   )
164 +
165 + # copy make tests to build
166 + file(COPY test DESTINATION ${CMAKE_BINARY_DIR})
167 +
168  
169   include(InstallRequiredSystemLibraries)
170   add_subdirectory(InstallRules)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines