windows: expose public APIs with dllimport for user apps
This commit is contained in:
parent
0ea020ec8f
commit
1969b83b9b
|
@ -150,6 +150,7 @@ endif ()
|
|||
include_directories("${PROJECT_SOURCE_DIR}/include")
|
||||
|
||||
if (BUILD_STATIC)
|
||||
add_definitions(-DCAPSTONE_STATIC)
|
||||
add_library(capstone STATIC ${SOURCES})
|
||||
else ()
|
||||
add_definitions(-DCAPSTONE_SHARED)
|
||||
|
|
|
@ -20,8 +20,10 @@ extern "C" {
|
|||
#pragma warning(disable:4100)
|
||||
#ifdef CAPSTONE_SHARED // compiling DLL file
|
||||
#define CAPSTONE_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#elif defined(CAPSTONE_STATIC)
|
||||
#define CAPSTONE_EXPORT
|
||||
#else // code uses our DLL
|
||||
#define CAPSTONE_EXPORT __declspec(dllimport)
|
||||
#endif
|
||||
#else // not MSVC
|
||||
#define CAPSTONE_EXPORT
|
||||
|
|
Loading…
Reference in New Issue