From 69a7b0e45e1191e4d77346ea65fe59a0d4e426ef Mon Sep 17 00:00:00 2001 From: modeco80 Date: Fri, 17 Jan 2025 22:25:13 -0500 Subject: [PATCH] (experimental) libeuropa: Make libeuropa a shared library Bleh. Might as well. NO ABI GUARANTEES UNTIL A REAL 1.0.0 RELEASE. --- CMakeLists.txt | 2 +- cmake/CompilerFlags-GNU.cmake | 2 +- src/libeuropa/CMakeLists.txt | 12 +++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e292fb..1f7ef42 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}") endif() project(EuropaTools - VERSION 1.0.0 + VERSION 0.5.0 LANGUAGES C CXX DESCRIPTION "Tools for working with LEC Europa based games (Star Wars: Starfighter & Star Wars: Jedi Starfighter)" ) diff --git a/cmake/CompilerFlags-GNU.cmake b/cmake/CompilerFlags-GNU.cmake index 3c3b0a5..6c0f10c 100644 --- a/cmake/CompilerFlags-GNU.cmake +++ b/cmake/CompilerFlags-GNU.cmake @@ -1,6 +1,6 @@ # TODO: This currently assumes libstdc++, later on we should *probably* set this with some detection # also TODO: Use a list so that this isn't one giant line (list JOIN should help.) -set(EUROPA_CORE_COMPILE_ARGS "-Wall -Wextra -Wformat=2 -Wimplicit-fallthrough -fvisibility=hidden") +set(EUROPA_CORE_COMPILE_ARGS "-Wall -Wextra -Wformat=2 -Wimplicit-fallthrough") set(EUROPA_CORE_LINKER_ARGS "-fuse-ld=${EUROPA_LINKER}") if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") # OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" diff --git a/src/libeuropa/CMakeLists.txt b/src/libeuropa/CMakeLists.txt index 4b77462..2dfd9bf 100644 --- a/src/libeuropa/CMakeLists.txt +++ b/src/libeuropa/CMakeLists.txt @@ -6,7 +6,14 @@ # SPDX-License-Identifier: MIT # -add_library(europa +# NOTICE: libeuropa in shared form does not have a stable ABI yet, +# and more than likely, until a defined semver release +# never will. +# +# There will probably be an option or additional target always +# to build static libeuropa. + +add_library(europa SHARED # Utility util/ImageSurface.cpp @@ -24,3 +31,6 @@ add_library(europa target_include_directories(europa PUBLIC ${PROJECT_SOURCE_DIR}/include) target_compile_features(europa PUBLIC cxx_std_20) + +# SOversion for *ix. +set_target_properties(europa PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 0) \ No newline at end of file