openbsd-ports/devel/cmake/patches/patch-CMakeLists_txt
dcoppa 57eaee2ae8 Update to cmake-2.8.6
Fixed FindRuby.cmake module (from Vadim Zhukov)

Fixed FindJava.cmake and FindJNI.cmake modules when cmake is used
outside of our ports tree (problem reported and fix tested by
pirofti@)

Still "100% tests passed, 0 tests failed out of 197".

No fallout in a bulk build.

OK jasper@
2011-10-14 17:22:10 +00:00

47 lines
1.6 KiB
Plaintext

$OpenBSD: patch-CMakeLists_txt,v 1.8 2011/10/14 17:22:10 dcoppa Exp $
--- CMakeLists.txt.orig Tue Oct 4 18:09:24 2011
+++ CMakeLists.txt Fri Oct 7 11:48:23 2011
@@ -252,6 +252,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