openbsd-ports/devel/cmake/patches/patch-CMakeLists_txt
dcoppa 4cd9f900fc Update to cmake-2.8.4.
Tested in a bulk build by landry@.
Lot of feedback from various people on ports@: thanks!

OK landry@, sthen@
2011-03-13 18:23:01 +00:00

47 lines
1.6 KiB
Plaintext

$OpenBSD: patch-CMakeLists_txt,v 1.6 2011/03/13 18:23:02 dcoppa Exp $
--- CMakeLists.txt.orig Tue Feb 15 18:47:26 2011
+++ CMakeLists.txt Mon Mar 7 10:10:46 2011
@@ -265,6 +265,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")
@@ -402,26 +411,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