From 449eb61eafa636592db86d6a27f3859a0e6cd3a3 Mon Sep 17 00:00:00 2001 From: rdbo Date: Tue, 10 Dec 2024 08:56:52 +0000 Subject: [PATCH] Revert "Added LM_STATIC preprocessor flag when doing a static build (#243)" This reverts commit ca421f7811025cbaf9b4958f4ff741e860f6672f. --- CMakeLists.txt | 1 - include/libmem/api.h | 10 +++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e32f5f7a..534057a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,7 +97,6 @@ set(LIBMEM_DEPS if (LIBMEM_BUILD_STATIC) add_library(libmem STATIC ${LIBMEM_SRC}) - target_compile_definitions(libmem PUBLIC LM_STATIC) else() add_library(libmem SHARED ${LIBMEM_SRC}) endif() diff --git a/include/libmem/api.h b/include/libmem/api.h index 886fbfa6..9ec5efcb 100644 --- a/include/libmem/api.h +++ b/include/libmem/api.h @@ -40,14 +40,10 @@ #endif /* Resolve import/export */ -#ifdef LM_STATIC -# define LM_API +#ifdef LM_EXPORT +# define LM_API LM_API_EXPORT #else -# ifdef LM_EXPORT -# define LM_API LM_API_EXPORT -# else -# define LM_API LM_API_IMPORT -# endif +# define LM_API LM_API_IMPORT #endif /* Calling convention */