summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-12-29 15:30:03 +0100
committerAndreas Schneider <asn@cryptomilk.org>2011-05-31 19:45:29 +0200
commitfba4b76aecd3d26a66295863e30877fea1322442 (patch)
treebd250fbc7e868fb62e0620ab05e7d962536f1aad /cmake
parent16d8fce4e84a5bc6dd5130ac841522bdc91fd71e (diff)
downloadcmocka-fba4b76aecd3d26a66295863e30877fea1322442.tar.gz
cmocka-fba4b76aecd3d26a66295863e30877fea1322442.tar.bz2
cmocka-fba4b76aecd3d26a66295863e30877fea1322442.zip
build: Added CPack config for source and binary generators.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/DefineCompilerFlags.cmake2
-rw-r--r--cmake/Modules/FindNSIS.cmake31
2 files changed, 32 insertions, 1 deletions
diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake
index 694cbdc..4c88d18 100644
--- a/cmake/Modules/DefineCompilerFlags.cmake
+++ b/cmake/Modules/DefineCompilerFlags.cmake
@@ -64,5 +64,5 @@ endif (UNIX AND NOT WIN32)
if (MSVC)
# Suppress warning about "deprecated" functions
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nologo -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x501")
endif (MSVC)
diff --git a/cmake/Modules/FindNSIS.cmake b/cmake/Modules/FindNSIS.cmake
new file mode 100644
index 0000000..c391043
--- /dev/null
+++ b/cmake/Modules/FindNSIS.cmake
@@ -0,0 +1,31 @@
+# - Try to find NSIS
+# Once done this will define
+#
+# NSIS_FOUND - system has NSIS
+# NSIS_MAKE - NSIS creator executable
+#
+# Copyright (c) 2010 Andreas Schneider <mail@cynapses.org>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+if (NSIS_MAKE)
+ # in cache already
+ set(NSIS_FOUND TRUE)
+elseif (NSIS_MAKE)
+ find_program(NSIS_MAKE
+ NAMES
+ makensis
+ PATHS
+ ${_NSIS_DIR}
+ ${_NSIS_DIR}/Bin
+ $ENV{PROGRAMFILES}/NSIS
+ )
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(NSIS DEFAULT_MSG NSIS_MAKE)
+
+ mark_as_advanced(NSIS_MAKE)
+endif (NSIS_MAKE)