- switch to cmake + ninja * the former builds a proper lib - package the shared library, fasttext binary and -devel properly (create new %package's for those) - add patches to fit our needs: * no-static-lib.patch * proper-lib-dir.patch * py-link-against-shared.patch OBS-URL: https://build.opensuse.org/request/show/1206651 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fasttext?expand=0&rev=11
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From: Jiri Slaby <jslaby@suse.cz>
|
|
Subject: [PATCH] no static lib
|
|
Patch-mainline: no
|
|
|
|
We do not want those. Link against shared instead.
|
|
---
|
|
CMakeLists.txt | 11 +----------
|
|
1 file changed, 1 insertion(+), 10 deletions(-)
|
|
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -57,22 +57,13 @@ if (NOT MSVC)
|
|
endif()
|
|
|
|
add_library(fasttext-shared SHARED ${SOURCE_FILES} ${HEADER_FILES})
|
|
-add_library(fasttext-static STATIC ${SOURCE_FILES} ${HEADER_FILES})
|
|
-add_library(fasttext-static_pic STATIC ${SOURCE_FILES} ${HEADER_FILES})
|
|
set_target_properties(fasttext-shared PROPERTIES OUTPUT_NAME fasttext
|
|
SOVERSION "${fasttext_VERSION_MAJOR}")
|
|
-set_target_properties(fasttext-static PROPERTIES OUTPUT_NAME fasttext)
|
|
-set_target_properties(fasttext-static_pic PROPERTIES OUTPUT_NAME fasttext_pic
|
|
- POSITION_INDEPENDENT_CODE True)
|
|
add_executable(fasttext-bin src/main.cc)
|
|
-target_link_libraries(fasttext-bin pthread fasttext-static)
|
|
+target_link_libraries(fasttext-bin pthread fasttext-shared)
|
|
set_target_properties(fasttext-bin PROPERTIES PUBLIC_HEADER "${HEADER_FILES}" OUTPUT_NAME fasttext)
|
|
install (TARGETS fasttext-shared
|
|
LIBRARY DESTINATION lib)
|
|
-install (TARGETS fasttext-static
|
|
- ARCHIVE DESTINATION lib)
|
|
-install (TARGETS fasttext-static_pic
|
|
- ARCHIVE DESTINATION lib)
|
|
install (TARGETS fasttext-bin
|
|
RUNTIME DESTINATION bin
|
|
PUBLIC_HEADER DESTINATION include/fasttext)
|