summaryrefslogtreecommitdiffstats
path: root/Source/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Sorley <ssorley@monetra.com>2017-10-09 15:39:29 (GMT)
committerStephen Sorley <ssorley@monetra.com>2017-10-13 17:07:37 (GMT)
commite1409101c99f7a3487990e9927e8bd0e275f564f (patch)
treee5c0ecb010bc9bbfc11aeea8a2e65bbe9eafd14a /Source/CMakeLists.txt
parente258fe03968d27871d6a57e3f4571bc8fbba6b9b (diff)
downloadCMake-e1409101c99f7a3487990e9927e8bd0e275f564f.zip
CMake-e1409101c99f7a3487990e9927e8bd0e275f564f.tar.gz
CMake-e1409101c99f7a3487990e9927e8bd0e275f564f.tar.bz2
cpack wix: support WiX generator on Cygwin
Cygwin-built CMake now converts paths from Cygwin to Windows form (using cygpath -w) before they're passed to WiX. The Wix generator on Cygwin requires the libuuid-dev package when building CMake. However, the DLL it links to is installed by default as part of Cygwin's core libs, so it does not need to be distributed. If libuuid-dev isn't available, CMake is simply built without Wix support on Cygwin.
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r--Source/CMakeLists.txt14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index a4dd918..e1c34bf 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -936,8 +936,13 @@ if(UNIX)
endif()
endif()
-if(WIN32)
+if(CYGWIN)
+ find_package(LibUUID)
+endif()
+if(WIN32 OR (CYGWIN AND LibUUID_FOUND))
set(CPACK_SRCS ${CPACK_SRCS}
+ CPack/Wix/cmCMakeToWixPath.cxx
+ CPack/Wix/cmCMakeToWixPath.h
CPack/WiX/cmCPackWIXGenerator.cxx
CPack/WiX/cmCPackWIXGenerator.h
CPack/WiX/cmWIXAccessControlList.cxx
@@ -958,7 +963,7 @@ if(WIN32)
CPack/WiX/cmWIXShortcut.h
CPack/WiX/cmWIXSourceWriter.cxx
CPack/WiX/cmWIXSourceWriter.h
- )
+ )
endif()
if(APPLE)
@@ -991,6 +996,11 @@ if(APPLE)
"See CMakeFiles/CMakeError.log for details of the failure.")
endif()
endif()
+if(CYGWIN AND LibUUID_FOUND)
+ target_link_libraries(CPackLib ${LibUUID_LIBRARIES})
+ include_directories(CPackLib ${LibUUID_INCLUDE_DIRS})
+ set_property(SOURCE CPack/cmCPackGeneratorFactory.cxx PROPERTY COMPILE_DEFINITIONS HAVE_LIBUUID)
+endif()
if(CPACK_ENABLE_FREEBSD_PKG AND FREEBSD_PKG_INCLUDE_DIRS AND FREEBSD_PKG_LIBRARIES)
target_link_libraries(CPackLib ${FREEBSD_PKG_LIBRARIES})
include_directories(${FREEBSD_PKG_INCLUDE_DIRS})