Skip to content

Commit

Permalink
Create version script file
Browse files Browse the repository at this point in the history
  • Loading branch information
In-line committed Jun 30, 2017
1 parent 9d88879 commit f45bfd1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ add_subdirectory(test)
file(GLOB_RECURSE SOURCE_FILES ${SRC_DIR}/*.h ${SRC_DIR}/*.cpp)

add_library(${PROJECT_NAME} SHARED ${SRC_LIST} ${SOURCE_FILES})
set(FLAGS "-m32 -O2 -fvisibility=hidden -flto -static-libstdc++")
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${FLAGS} LINK_FLAGS ${FLAGS})
set(FLAGS "-m32 -O2 -fvisibility=hidden -flto")
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${FLAGS} LINK_FLAGS "${FLAGS} -static-libgcc -static-libstdc++ -Wl,--version-script=${CMAKE_SOURCE_DIR}/version_script.lds")

target_compile_features(${PROJECT_NAME} PRIVATE cxx_range_for)

add_library(${PROJECT_NAME}_static STATIC ${SRC_LIST} ${SOURCE_FILES})
set_target_properties(${PROJECT_NAME}_static PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
set_target_properties(${PROJECT_NAME}_static PROPERTIES COMPILE_FLAGS "-m32 -O0" LINK_FLAGS "-m32 -O0")
target_compile_features(${PROJECT_NAME}_static PRIVATE cxx_range_for)

# Set a default build type if none was specified
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static META_FUNCTIONS gMetaFunctionTable = {
plugin_info_t Plugin_info = {
META_INTERFACE_VERSION,
"Ultimate Unprecacher",
"Beta 2.0",
"Beta 2.2",
"2016/05/18",
"Alik Aslanyan <cplusplus256@gmail.com>",
"https://github.com/in-line/metamod_unprecacher",
Expand Down
7 changes: 7 additions & 0 deletions version_script.lds
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
METAMOD_UNPRECACHER_ABI_1.0 {
global:
Meta_*;
GiveFnptrsToDll;
local:
*;
};

0 comments on commit f45bfd1

Please sign in to comment.