From d0080e36b9ea95b040518969ffc3704533595aae Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Fri, 16 Jan 2015 14:41:30 +0100
Subject: [PATCH] Small NSIS installer fixes.

---
 Applications/DataExplorer/DataExplorer.cmake       | 2 +-
 Applications/Utils/OGSFileConverter/CMakeLists.txt | 6 +++---
 scripts/cmake/CMakeSetup.cmake                     | 3 ---
 scripts/cmake/CompilerSetup.cmake                  | 8 ++++----
 scripts/cmake/packaging/PackagingWin.cmake         | 7 +++++--
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake
index f11404fd277..0421bf76955 100644
--- a/Applications/DataExplorer/DataExplorer.cmake
+++ b/Applications/DataExplorer/DataExplorer.cmake
@@ -155,7 +155,7 @@ cpack_add_component(ogs_gui
 	DESCRIPTION "The graphical user interface for OpenGeoSys."
 	GROUP Applications
 )
-set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "DataExplorer" "OGS Data Explorer")
+set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "DataExplorer" "OGS Data Explorer" PARENT_SCOPE)
 set(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} "bin/DataExplorer.exe" "Data Explorer" PARENT_SCOPE)
 IF(APPLE)
 	RETURN()
diff --git a/Applications/Utils/OGSFileConverter/CMakeLists.txt b/Applications/Utils/OGSFileConverter/CMakeLists.txt
index 07c1925deb2..ad916f98e78 100644
--- a/Applications/Utils/OGSFileConverter/CMakeLists.txt
+++ b/Applications/Utils/OGSFileConverter/CMakeLists.txt
@@ -96,6 +96,6 @@ SET_PROPERTY(TARGET OGSFileConverter PROPERTY FOLDER "Utilities")
 ### Installation ###
 ####################
 
-IF(OGS_PACKAGING)
-	INSTALL (TARGETS OGSFileConverter RUNTIME DESTINATION bin COMPONENT ogs)
-ENDIF()
+INSTALL (TARGETS OGSFileConverter RUNTIME DESTINATION bin COMPONENT ogs_cli)
+set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "OGSFileConverter" "File Converter")
+set(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} "bin/OGSFileConverter.exe" "File Converter" PARENT_SCOPE)
diff --git a/scripts/cmake/CMakeSetup.cmake b/scripts/cmake/CMakeSetup.cmake
index 7c6a8b3ee21..3704b5143ca 100644
--- a/scripts/cmake/CMakeSetup.cmake
+++ b/scripts/cmake/CMakeSetup.cmake
@@ -18,9 +18,6 @@ INCLUDE(GetGitRevisionDescription)
 GET_GIT_HEAD_REVISION(GIT_REFSPEC GIT_SHA1)
 STRING(SUBSTRING ${GIT_SHA1} 0 8 GIT_SHA1_SHORT)
 
-# Suppress warning on setting policies
-CMAKE_POLICY(SET CMP0011 OLD)
-
 # Get the hostname
 SITE_NAME(HOSTNAME)
 
diff --git a/scripts/cmake/CompilerSetup.cmake b/scripts/cmake/CompilerSetup.cmake
index d085bd7d526..79e78f8fb3e 100644
--- a/scripts/cmake/CompilerSetup.cmake
+++ b/scripts/cmake/CompilerSetup.cmake
@@ -7,13 +7,13 @@ SET(CMAKE_OSX_ARCHITECTURES "x86_64")
 
 # Set compiler helper variables
 
-IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+IF (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
     SET(COMPILER_IS_CLANG TRUE)
-ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ELSEIF (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
     SET(COMPILER_IS_GCC TRUE)
-ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
+ELSEIF (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
     SET(COMPILER_IS_INTEL TRUE)
-ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+ELSEIF (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
     SET(COMPILER_IS_MSVC TRUE)
 ENDIF () # CMAKE_CXX_COMPILER_ID
 
diff --git a/scripts/cmake/packaging/PackagingWin.cmake b/scripts/cmake/packaging/PackagingWin.cmake
index 005a38ccd33..87a16027fc0 100644
--- a/scripts/cmake/packaging/PackagingWin.cmake
+++ b/scripts/cmake/packaging/PackagingWin.cmake
@@ -13,6 +13,9 @@ SET(CPACK_NSIS_HELP_LINK "http://docs.opengeosys.org/assets/files/Documentation/
 SET(CPACK_NSIS_MENU_LINKS
 	"bin" "Executables folder"
 	"http://www.opengeosys.org" "Website"
-	"https://github.com/ufz/ogs" "Source code on GitHub"
-	"docs" "Documentation folder"
+	"https://github.com/ufz/ogs" "Source code on GitFHub"
+	PARENT_SCOPE
 )
+IF(OGS_DOWNLOAD_ADDITIONAL_CONTENT)
+	SET(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} "docs" "Documentation folder" PARENT_SCOPE)
+ENDIF()
-- 
GitLab