summaryrefslogtreecommitdiffstats
path: root/libraries/pack200
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/pack200')
-rw-r--r--libraries/pack200/CMakeLists.txt12
-rw-r--r--libraries/pack200/include/unpack200.h5
2 files changed, 10 insertions, 7 deletions
diff --git a/libraries/pack200/CMakeLists.txt b/libraries/pack200/CMakeLists.txt
index b060905b..85f32408 100644
--- a/libraries/pack200/CMakeLists.txt
+++ b/libraries/pack200/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.1)
-project(unpack200)
+project(MultiMC_unpack200)
option(PACK200_BUILD_BINARY "Build a tiny utility that decompresses pack200 streams" OFF)
@@ -28,12 +28,14 @@ set(PACK200_SRC
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-add_library(unpack200 STATIC ${PACK200_SRC})
-target_include_directories(unpack200 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" PRIVATE ${ZLIB_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/src")
+add_library(MultiMC_unpack200 SHARED ${PACK200_SRC})
+target_include_directories(MultiMC_unpack200 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}" PRIVATE ${ZLIB_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/src")
+target_link_libraries(MultiMC_unpack200 ${ZLIB_LIBRARIES})
-target_link_libraries(unpack200 ${ZLIB_LIBRARIES})
+set_target_properties(MultiMC_unpack200 PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN 1)
+generate_export_header(MultiMC_unpack200)
if(PACK200_BUILD_BINARY)
add_executable(anti200 anti200.cpp)
- target_link_libraries(anti200 unpack200)
+ target_link_libraries(anti200 MultiMC_unpack200)
endif()
diff --git a/libraries/pack200/include/unpack200.h b/libraries/pack200/include/unpack200.h
index 9c3eda2d..30ce6656 100644
--- a/libraries/pack200/include/unpack200.h
+++ b/libraries/pack200/include/unpack200.h
@@ -24,7 +24,8 @@
*/
#pragma once
-#include <string>
+
+#include "multimc_unpack200_export.h"
/**
* @brief Unpack a PACK200 file
@@ -33,4 +34,4 @@
* @param output_path Path to the output file in PACK200 format. System native string encoding.
* @throw std::runtime_error for any error encountered
*/
-void unpack_200(FILE * input_path, FILE * output_path);
+MULTIMC_UNPACK200_EXPORT void unpack_200(FILE * input_path, FILE * output_path);