mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-12 14:00:19 -04:00
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
$NetBSD: patch-CMakeLists.txt,v 1.3 2014/03/13 13:25:49 adam Exp $
|
|
|
|
Allow in-tree build.
|
|
Handle .dylib extension on Darwin.
|
|
|
|
--- CMakeLists.txt.orig 2014-03-08 04:36:49.000000000 +0000
|
|
+++ CMakeLists.txt
|
|
@@ -1,6 +1,3 @@
|
|
-if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
|
- message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
|
|
-endif()
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
project(SDL2 C)
|
|
@@ -1283,10 +1280,15 @@ install(FILES ${INCLUDE_FILES} DESTINATI
|
|
|
|
if(NOT WINDOWS OR CYGWIN)
|
|
if(SDL_SHARED)
|
|
+ if(APPLE)
|
|
+ set(SO_EXT "dylib")
|
|
+ else(APPLE)
|
|
+ set(SO_EXT "so")
|
|
+ endif(APPLE)
|
|
install(CODE "
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
|
|
- \"libSDL2-2.0.so\" \"libSDL2.so\")")
|
|
- install(FILES ${SDL2_BINARY_DIR}/libSDL2.so DESTINATION "lib${LIB_SUFFIX}")
|
|
+ \"libSDL2-2.0.${SO_EXT}\" \"libSDL2.${SO_EXT}\")")
|
|
+ install(FILES ${SDL2_BINARY_DIR}/libSDL2.${SO_EXT} DESTINATION "lib${LIB_SUFFIX}")
|
|
endif()
|
|
if(FREEBSD)
|
|
# FreeBSD uses ${PREFIX}/libdata/pkgconfig
|