openbsd-ports/devel/cmake/patches/patch-Modules_Platform_OpenBSD_cmake
dcoppa 7283a0afb2 Fix a bug with shared libraries having OUTPUT_NAME in their target
properties.

Update to cmake-2.8.2.

While here, move to new-style LIB_DEPENDS/WANTLIB.

OK espie@, landry@, sthen@
2010-07-12 19:19:30 +00:00

34 lines
1.3 KiB
Plaintext

$OpenBSD: patch-Modules_Platform_OpenBSD_cmake,v 1.4 2010/07/12 19:19:30 dcoppa Exp $
--- Modules/Platform/OpenBSD.cmake.orig Mon Jun 28 17:15:57 2010
+++ Modules/Platform/OpenBSD.cmake Fri Jul 9 16:21:13 2010
@@ -1,5 +1,24 @@
INCLUDE(Platform/NetBSD)
+IF($ENV{LOCALBASE})
+ SET(OPENBSD_LOCALBASE $ENV{LOCALBASE})
+ELSE($ENV{LOCALBASE})
+ SET(OPENBSD_LOCALBASE /usr/local)
+ENDIF($ENV{LOCALBASE})
+
+IF($ENV{X11BASE})
+ SET(OPENBSD_X11BASE $ENV{X11BASE})
+ELSE($ENV{X11BASE})
+ SET(OPENBSD_X11BASE /usr/X11R6)
+ENDIF($ENV{X11BASE})
+
+SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /usr/include
+ ${OPENBSD_LOCALBASE}/include ${OPENBSD_X11BASE}/include)
+SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /usr/lib
+ ${OPENBSD_LOCALBASE}/lib ${OPENBSD_X11BASE}/lib)
+SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH} /bin /usr/bin
+ ${OPENBSD_LOCALBASE}/bin /sbin /usr/sbin ${OPENBSD_LOCALBASE}/sbin)
+
# On OpenBSD, the compile time linker does not share it's configuration with
# the runtime linker. This will extract the library search paths from the
# system's ld.so.hints file which will allow CMake to set the appropriate
@@ -16,3 +35,4 @@ IF(NOT CMAKE_PLATFORM_RUNTIME_PATH)
ENDIF()
SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1)
+SET(CMAKE_INSTALL_SO_NO_EXE 1)