From e9003c815444b9e90aff403375964386564e6457 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 20 Jun 2007 09:58:45 +0000 Subject: - added win32 packager support - added explorer integration for easier access to the build environment (shell scripts with predefined pathes for mingw and nmake and msvc) svn path=/trunk/KDE/kdelibs/; revision=677974 --- modules/Win32Macros.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 modules/Win32Macros.cmake (limited to 'modules/Win32Macros.cmake') diff --git a/modules/Win32Macros.cmake b/modules/Win32Macros.cmake new file mode 100644 index 00000000..4385cc97 --- /dev/null +++ b/modules/Win32Macros.cmake @@ -0,0 +1,44 @@ +# +# win32 macros +# +# Copyright (c) 2006-2007, Ralf Habacker +# +# Redistribution and use is allowed according to the terms of the BSD license. +# + +if (WIN32) + # + # addExplorerWrapper creates batch files for fast access + # to the build environment from the win32 explorer. + # + # For mingw and nmake projects it's opens a command shell, + # for Visual Studio IDE's (at least tested with VS 8 2005) it + # opens the related .sln file with paths setting specified at + # configure time. + # + MACRO (addExplorerWrapper _projectname) + # write explorer wrappers + get_filename_component(CMAKE_BIN_PATH ${CMAKE_COMMAND} PATH) + set (ADD_PATH "${CMAKE_BIN_PATH}") + + if (QT_QMAKE_EXECUTABLE) + get_filename_component(QT_BIN_PATH ${QT_QMAKE_EXECUTABLE} PATH) + set (ADD_PATH "${ADD_PATH};${QT_BIN_PATH}") + endif (QT_QMAKE_EXECUTABLE) + + # add here more pathes + + if (MINGW) + get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH) + set (ADD_PATH "${ADD_PATH};${MINGW_BIN_PATH}") + write_file (${CMAKE_BINARY_DIR}/${_projectname}-shell.bat "set PATH=${ADD_PATH};%PATH%\ncmd.exe") + else (MINGW) + if (CMAKE_BUILD_TOOL STREQUAL "nmake") + get_filename_component(VC_BIN_PATH ${CMAKE_CXX_COMPILER} PATH) + write_file (${CMAKE_BINARY_DIR}/${_projectname}-shell.bat "set PATH=${ADD_PATH};%PATH%\ncall \"${VC_BIN_PATH}\\vcvars32.bat\"\ncmd.exe") + else (CMAKE_BUILD_TOOL STREQUAL "nmake") + write_file (${CMAKE_BINARY_DIR}/${_projectname}-sln.bat "set PATH=${ADD_PATH};%PATH%\nstart ${_projectname}.sln") + endif (CMAKE_BUILD_TOOL STREQUAL "nmake") + endif (MINGW) + ENDMACRO (addExplorerWrapper) +endif(WIN32) -- cgit v1.2.1 From c9d3b8bd84f2d0f71a0117326393dc7e865ad62b Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 11 Sep 2007 17:01:25 +0000 Subject: fixed spelling error svn path=/trunk/KDE/kdelibs/; revision=711185 --- modules/Win32Macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/Win32Macros.cmake') diff --git a/modules/Win32Macros.cmake b/modules/Win32Macros.cmake index 4385cc97..3b2df54b 100644 --- a/modules/Win32Macros.cmake +++ b/modules/Win32Macros.cmake @@ -11,7 +11,7 @@ if (WIN32) # addExplorerWrapper creates batch files for fast access # to the build environment from the win32 explorer. # - # For mingw and nmake projects it's opens a command shell, + # For mingw and nmake projects it opens a command shell, # for Visual Studio IDE's (at least tested with VS 8 2005) it # opens the related .sln file with paths setting specified at # configure time. -- cgit v1.2.1 From 814455b7ad321c88e730662fda58261087b72e72 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 18 Feb 2008 19:06:32 +0000 Subject: some improvements to the docs: -some modules were not at all documented, only few are left now -the copyright message doesn't have to be printed for every module in the docs -fix FindKorundom.cmake, it didn't follow the style guide and had typos (e.g. Korumdum_FOUND instead of KORUNDUM_FOUND) Alex (will commit modified FindKDE4Internal.cmake after Christians commit) svn path=/trunk/KDE/kdelibs/; revision=776742 --- modules/Win32Macros.cmake | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'modules/Win32Macros.cmake') diff --git a/modules/Win32Macros.cmake b/modules/Win32Macros.cmake index 3b2df54b..e5a3655b 100644 --- a/modules/Win32Macros.cmake +++ b/modules/Win32Macros.cmake @@ -1,20 +1,23 @@ +# win32 macros # -# win32 macros +# ADDEXPLORERWRAPPER(project) +# +# Exists only under Win32 ! +# +# addExplorerWrapper creates batch files for fast access +# to the build environment from the win32 explorer. # +# For mingw and nmake projects it opens a command shell, +# for Visual Studio IDE's (at least tested with VS 8 2005) it +# opens the related .sln file with paths setting specified at +# configure time. + # Copyright (c) 2006-2007, Ralf Habacker # # Redistribution and use is allowed according to the terms of the BSD license. -# + if (WIN32) - # - # addExplorerWrapper creates batch files for fast access - # to the build environment from the win32 explorer. - # - # For mingw and nmake projects it opens a command shell, - # for Visual Studio IDE's (at least tested with VS 8 2005) it - # opens the related .sln file with paths setting specified at - # configure time. # MACRO (addExplorerWrapper _projectname) # write explorer wrappers -- cgit v1.2.1