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.7 by greg, Thu Aug 16 17:59:45 2012 UTC vs.
Revision 1.12 by greg, Fri Apr 18 20:51:49 2014 UTC

# Line 5 | Line 5 | enable_testing()
5   include(CTest)
6  
7   option(BUILD_SHARED_LIBS "Build radiance using shared libraries?" OFF)
8 + option(BUILD_HEADLESS "Build radiance without any GUI components?" OFF)
9  
10 + option(CPACK_NREL_SUPPORT "Include OpenStudio ToolFinder Help?" OFF)
11 +
12 + if( CPACK_NREL_SUPPORT )
13 +  # find git so we can query for the current git tag
14 +  find_program(git git)
15 +  if (NOT git)
16 +    message(ERROR "Please specify the path to the git executable")
17 +  endif()
18 +
19 +  # call git log to get output containing the tag
20 +  execute_process(
21 +    COMMAND ${git} describe --tag --exact-match
22 +    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
23 +    OUTPUT_VARIABLE git_tag_output)
24 +
25 +  # create & install the source version .txt file
26 +  file(WRITE "NREL_ver.txt" "Radiance version ${git_tag_output}")
27 +  install(FILES NREL_ver.txt DESTINATION bin/..)
28 + endif()
29 +
30   if(NOT WIN32)
31    set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 1)
32    install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc/man/ DESTINATION man)
33    set(qt_plugin_term "PLUGIN")
34   endif()
35  
15
36   if (WIN32)
37 <
18 <  set(CPACK_NSIS_MODIFY_PATH 0)
19 <
20 <  set(CPACK_BINARY_ZIP 1)
21 <
22 <  set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "")
37 >  set(CPACK_NSIS_MODIFY_PATH 1)
38    set(qt_plugin_term "LIBRARY")
39  
40 +  # Set RAYPATH on install
41 +  set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
42 +    "WriteRegExpandStr HKLM \\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\" RAYPATH '\\\$INSTDIR\\\\lib\\\;.'"
43 +  )
44 +
45 +  # Unset RAYPATH on uninstall
46 +  set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
47 +    "DeleteRegValue HKLM \\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\" RAYPATH"
48 +  )
49   endif()
50  
51   if(UNIX)
# Line 34 | Line 58 | endif()
58   if(APPLE)
59    add_definitions(-DBSD -DNOSTEREO -Dfreebsd)
60    include_directories(/usr/X11R6/include)
61 +  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.6")
62   endif()
63  
64   IF( BUILD_PACKAGE )
# Line 51 | Line 76 | SET(CPACK_RESOURCE_FILE_LICENSE "${radiance_SOURCE_DIR
76  
77   include(CPack)
78  
79 < find_package(Qt4 COMPONENTS QtCore QtGui)
80 < find_package(X11)
79 > if(NOT BUILD_HEADLESS)
80 >  find_package(Qt4 COMPONENTS QtCore QtGui)
81 >  find_package(X11)
82 > endif()
83  
84   SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
85  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines