From 009fb966a6fc7dfdc60905ec6cecc5135b9fe41a Mon Sep 17 00:00:00 2001 From: Randy Date: Mon, 3 Aug 2020 22:45:50 +0200 Subject: [PATCH] drop CGLM_DLL, add CGLM_STATIC --- CMakeLists.txt | 3 ++- include/cglm/common.h | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index afc31d1..d31fe5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,8 @@ add_library(${PROJECT_NAME} if(CGLM_SHARED) add_definitions(-DCGLM_EXPORTS) - target_compile_definitions(${PROJECT_NAME} PUBLIC -DCGLM_DLL) +else() + target_compile_definitions(${PROJECT_NAME} PUBLIC -DCGLM_STATIC) endif() set_target_properties(${PROJECT_NAME} PROPERTIES diff --git a/include/cglm/common.h b/include/cglm/common.h index 8d68628..810d7ef 100644 --- a/include/cglm/common.h +++ b/include/cglm/common.h @@ -23,12 +23,12 @@ #include #if defined(_MSC_VER) -# ifdef CGLM_EXPORTS -# define CGLM_EXPORT __declspec(dllexport) -# elif defined(CGLM_DLL) -# define CGLM_EXPORT __declspec(dllimport) -# else +# ifdef CGLM_STATIC # define CGLM_EXPORT +# elif defined(CGLM_EXPORTS) +# define CGLM_EXPORT __declspec(dllexport) +# else +# define CGLM_EXPORT __declspec(dllimport) # endif # define CGLM_INLINE __forceinline #else