add windows fst library
This commit is contained in:
parent
1efb574a98
commit
c45d7b5024
@ -77,4 +77,11 @@ http://www.eclipse.org/legal/epl-v10.html
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.minres.scviewer.database.fst"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
@ -5,4 +5,5 @@ bin.includes = META-INF/,\
|
||||
lib/jna-5.13.0.jar,\
|
||||
lib/jna-jpms-5.13.0.jar,\
|
||||
linux-x86-64/,\
|
||||
win32-x86-64/,\
|
||||
OSGI-INF/
|
||||
|
@ -3,11 +3,24 @@ cmake_minimum_required (VERSION 3.0)
|
||||
project (fstlib VERSION 1.0.0)
|
||||
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
find_package(ZLIB REQUIRED)
|
||||
#find_package(ZLIB REQUIRED)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
zlib
|
||||
URL https://www.zlib.net/zlib-1.2.13.tar.gz
|
||||
https://www.zlib.net/fossils/zlib-1.2.13.tar.gz
|
||||
https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz
|
||||
URL_HASH MD5=9b8aa094c4e5765dabf4da391f00d15c
|
||||
)
|
||||
FetchContent_Populate(zlib)
|
||||
add_subdirectory(${zlib_SOURCE_DIR} ${zlib_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
add_library(ZLIB::ZLIB ALIAS zlibstatic)
|
||||
target_include_directories(zlibstatic INTERFACE ${zlib_BINARY_DIR} ${zlib_SOURCE_DIR})
|
||||
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
add_library(fstapi fstapi.c lz4.c fastlz.c fst_helper.c)
|
||||
target_include_directories(fstapi PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(fstapi PRIVATE ${ZLIB_LIBRARIES})
|
||||
#target_include_directories(fstapi PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(fstapi PRIVATE zlibstatic)
|
||||
# hack to avoid creating dummy config.h
|
||||
target_compile_definitions(fstapi PRIVATE -DFST_CONFIG_INCLUDE="fstapi.h")
|
||||
|
||||
@ -18,4 +31,5 @@ if(MSVC)
|
||||
endif()
|
||||
|
||||
install(TARGETS fstapi
|
||||
LIBRARY DESTINATION .)
|
||||
LIBRARY DESTINATION .
|
||||
RUNTIME DESTINATION .)
|
||||
|
@ -0,0 +1,2 @@
|
||||
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=../../win32-x86-64
|
||||
cmake --build build --target install --config Release
|
@ -1,2 +1,2 @@
|
||||
cmake -B build -S . -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=../../linux-x86-64
|
||||
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=../../linux-x86-64 -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --target install
|
||||
|
BIN
plugins/com.minres.scviewer.database.fst/win32-x86-64/fstapi.dll
Normal file
BIN
plugins/com.minres.scviewer.database.fst/win32-x86-64/fstapi.dll
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user