openbsd-ports/devel/cmake/patches/patch-CMakeLists_txt
dcoppa d89de7a682 Update to cmake-2.8.5
Went in a bulk without issues, ok landry@
2011-09-20 11:32:36 +00:00

47 lines
1.6 KiB
Plaintext

$OpenBSD: patch-CMakeLists_txt,v 1.7 2011/09/20 11:32:36 dcoppa Exp $
--- CMakeLists.txt.orig Fri Jul 8 14:21:43 2011
+++ CMakeLists.txt Fri Sep 9 09:49:49 2011
@@ -250,6 +250,15 @@ MACRO (CMAKE_BUILD_UTILITIES)
# (a macro defined in this file)
CMAKE_HANDLE_SYSTEM_LIBRARIES()
+ IF($ENV{LOCALBASE})
+ SET(OPENBSD_LOCALBASE $ENV{LOCALBASE})
+ ELSE($ENV{LOCALBASE})
+ SET(OPENBSD_LOCALBASE /usr/local)
+ ENDIF($ENV{LOCALBASE})
+
+ # to find expat and curl
+ LINK_DIRECTORIES("${OPENBSD_LOCALBASE}/lib")
+
#---------------------------------------------------------------------
# Build zlib library for Curl, CMake, and CTest.
SET(CMAKE_ZLIB_HEADER "cm_zlib.h")
@@ -388,26 +397,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
ELSE (UNIX)
SET(BUILD_CursesDialog 0)
ENDIF (UNIX)
- IF(BUILD_CursesDialog)
- ADD_SUBDIRECTORY(Source/CursesDialog/form)
- ENDIF(BUILD_CursesDialog)
ENDMACRO (CMAKE_BUILD_UTILITIES)
-
-#-----------------------------------------------------------------------
-IF(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
- EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER}
- ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
- OUTPUT_VARIABLE _GXX_VERSION
- )
- STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
- _GXX_VERSION_SHORT ${_GXX_VERSION})
- IF(_GXX_VERSION_SHORT EQUAL 33)
- MESSAGE(FATAL_ERROR
- "GXX 3.3 on OpenBSD is known to cause CPack to Crash.\n"
- "Please use GXX 4.2 or greater to build CMake on OpenBSD\n"
- "${CMAKE_CXX_COMPILER} version is: ${_GXX_VERSION}")
- ENDIF()
-ENDIF()
#-----------------------------------------------------------------------
# The main section of the CMakeLists file