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.9 by greg, Thu Mar 20 22:49:21 2014 UTC vs.
Revision 1.12 by greg, Fri Apr 18 20:51:49 2014 UTC

# Line 7 | Line 7 | include(CTest)
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  
16
36   if (WIN32)
37 <
19 <  set(CPACK_NSIS_MODIFY_PATH 0)
20 <
21 <  set(CPACK_BINARY_ZIP 1)
22 <
23 <  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)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines