diff options
-rw-r--r-- | src/xxhash-1-fixes.patch | 51 | ||||
-rw-r--r-- | src/xxhash.mk | 2 |
2 files changed, 38 insertions, 15 deletions
diff --git a/src/xxhash-1-fixes.patch b/src/xxhash-1-fixes.patch index d90ad6c..c3f9b85 100644 --- a/src/xxhash-1-fixes.patch +++ b/src/xxhash-1-fixes.patch @@ -1,23 +1,48 @@ +This file is part of MXE. +See index.html for further 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] 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 825193e..79adbc3 100644 +index 1111111..2222222 100644 --- a/cmake_unofficial/CMakeLists.txt +++ b/cmake_unofficial/CMakeLists.txt -@@ -6,15 +6,16 @@ project(xxhash) +@@ -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}") - set(install_libs xxhash) ++ 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") + set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libraries") if(BUILD_STATIC_LIBS) -- add_library(xxhashstatic ../xxhash.c) -+ add_library(xxhashstatic STATIC ../xxhash.c) - set_target_properties(xxhashstatic PROPERTIES OUTPUT_NAME xxhash) - LIST(APPEND install_libs xxhashstatic) - endif(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 ++) diff --git a/src/xxhash.mk b/src/xxhash.mk index c3d0d89..01e26fd 100644 --- a/src/xxhash.mk +++ b/src/xxhash.mk @@ -24,5 +24,3 @@ define $(PKG)_BUILD $(MAKE) -C '$(1).build' -j '$(JOBS)' $(MAKE) -C '$(1).build' -j 1 install endef - -$(PKG)_BUILD_SHARED = |