openbsd-ports/devel/cmake/patches/patch-CMakeLists_txt
dcoppa 195d9f90cf Update to cmake-2.8.3
OK sthen@, landry@ (who also tested this in a bulk build)
2010-11-15 11:39:08 +00:00

47 lines
1.6 KiB
Plaintext

$OpenBSD: patch-CMakeLists_txt,v 1.5 2010/11/15 11:39:08 dcoppa Exp $
--- CMakeLists.txt.orig Wed Nov 3 20:58:27 2010
+++ CMakeLists.txt Wed Nov 10 09:05:48 2010
@@ -253,6 +253,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")
@@ -390,26 +399,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