Skip to content

Commit

Permalink
static lib
Browse files Browse the repository at this point in the history
  • Loading branch information
liuhong committed Apr 28, 2022
1 parent 37a2573 commit 69e7b2a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ endif()

set(LIBS png cxbin trimesh2 zlib)
set(INCS ${GLM_INCLUDE_DIRS})
set(DEFS GLM_FORCE_LEFT_HANDED THUMBNAIL_DLL)
set(DEFS GLM_FORCE_LEFT_HANDED)

__add_real_target(thumbnail dll SOURCE
thumbnail/stl/helpers.h
set(SRCS thumbnail/stl/helpers.h
thumbnail/stl/parser.h
thumbnail/stl/parser.cpp
thumbnail/picture.cpp
Expand Down Expand Up @@ -42,6 +41,8 @@ __add_real_target(thumbnail dll SOURCE
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
)

__add_common_library(thumbnail)

if(INSTALL_THUMBNAIL)
INSTALL(TARGETS thumbnail
LIBRARY DESTINATION lib
Expand Down
22 changes: 11 additions & 11 deletions thumbnail/exporter.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

#ifndef THUMBNAIL_EXPORT
#define THUMBNAIL_EXPORT
#include "ccglobal/export.h"

#ifdef WIN32
#ifdef THUMBNAIL_DLL
#define THUMBNAIL_API __declspec(dllexport)
#else
#define THUMBNAIL_API __declspec(dllimport)
#endif
#if USE_THUMBNAIL_DLL
#define THUMBNAIL_API CC_DECLARE_IMPORT
#elif USE_THUMBNAIL_STATIC
#define THUMBNAIL_API CC_DECLARE_STATIC
#else
#if THUMBNAIL_DLL
#define THUMBNAIL_API CC_DECLARE_EXPORT
#else
#ifdef THUMBNAIL_DLL
#define THUMBNAIL_API __attribute__((visibility("default")))
#else
#define THUMBNAIL_API
#endif
#define THUMBNAIL_API CC_DECLARE_STATIC
#endif
#endif

#endif // THUMBNAIL_EXPORT

0 comments on commit 69e7b2a

Please sign in to comment.