You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/xxhash-1-fixes.patch

48 lines
1.7 KiB

This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Wed, 6 Jul 2016 22:12:35 +0200
Subject: [PATCH 1/1] install .dll to bin/ instead of lib/
Add cmake option BUILD_SHARED_LIBS to prevent building shared library
on static target.
diff --git a/cmake_unofficial/CMakeLists.txt b/cmake_unofficial/CMakeLists.txt
index 1111111..2222222 100644
--- a/cmake_unofficial/CMakeLists.txt
+++ b/cmake_unofficial/CMakeLists.txt
@@ -6,11 +6,14 @@ project(xxhash)
set(XXHASH_LIB_VERSION "0.42.0")
set(XXHASH_LIB_SOVERSION "0")
-add_library(xxhash SHARED ../xxhash.c)
-set_target_properties(xxhash PROPERTIES COMPILE_DEFINITIONS "XXHASH_EXPORT"
- VERSION "${XXHASH_LIB_VERSION}"
- SOVERSION "${XXHASH_LIB_SOVERSION}")
-set(install_libs xxhash)
+set(BUILD_SHARED_LIBS ON CACHE BOOL "Set to ON to build shared libraries")
+if(BUILD_SHARED_LIBS)
+ add_library(xxhash SHARED ../xxhash.c)
+ set_target_properties(xxhash PROPERTIES COMPILE_DEFINITIONS "XXHASH_EXPORT"
+ VERSION "${XXHASH_LIB_VERSION}"
+ SOVERSION "${XXHASH_LIB_SOVERSION}")
+ LIST(APPEND install_libs xxhash)
+endif(BUILD_SHARED_LIBS)
set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libraries")
if(BUILD_STATIC_LIBS)
@@ -21,4 +24,9 @@ endif(BUILD_STATIC_LIBS)
INSTALL(FILES ../xxhash.h DESTINATION include)
-INSTALL(TARGETS ${install_libs} DESTINATION lib)
+INSTALL(
+ TARGETS ${install_libs}
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+)