Commit 07c75449 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

Fixed Windows static lib buid.

parent c7acc822
...@@ -86,11 +86,12 @@ ADD_DEFINITIONS("-DHAVE_CONFIG_H") ...@@ -86,11 +86,12 @@ ADD_DEFINITIONS("-DHAVE_CONFIG_H")
# Allow the developer to select if Dynamic or Static libraries are built # Allow the developer to select if Dynamic or Static libraries are built
OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" OFF) OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
SET (LIB_TYPE STATIC)
IF (BUILD_SHARED_LIBS) IF (BUILD_SHARED_LIBS)
# User wants to build Dynamic Libraries, # User wants to build Dynamic Libraries,
# so change the LIB_TYPE variable to CMake keyword 'SHARED' # so change the LIB_TYPE variable to CMake keyword 'SHARED'
SET (LIB_TYPE SHARED) SET (LIB_TYPE SHARED)
ELSE(BUILD_SHARED_LIBS)
SET (LIB_TYPE STATIC)
ENDIF (BUILD_SHARED_LIBS) ENDIF (BUILD_SHARED_LIBS)
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}") INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
......
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
#cmakedefine WORDS_BIGENDIAN 1 #cmakedefine WORDS_BIGENDIAN 1
#cmakedefine HAVE_DECL___BUILTIN_CLZLL 1 #cmakedefine HAVE_DECL___BUILTIN_CLZLL 1
#cmakedefine HAVE_BSR64 1 #cmakedefine HAVE_BSR64 1
#cmakedefine BUILD_SHARED_LIBS 1
...@@ -59,15 +59,14 @@ ...@@ -59,15 +59,14 @@
# include <config.h> # include <config.h>
#endif #endif
#ifdef _WIN32 #if _WIN32 && BUILD_SHARED_LIBS
# ifdef DLL_EXPORT # ifdef DLL_EXPORT
# define AEC_SCOPE __declspec(dllexport) # define AEC_SCOPE __declspec(dllexport)
# else # else
# define AEC_SCOPE extern __declspec(dllimport) # define AEC_SCOPE extern __declspec(dllimport)
# endif # endif
#endif #else
#ifndef AEC_SCOPE # define AEC_SCOPE extern
# define AEC_SCOPE extern
#endif #endif
struct internal_state; struct internal_state;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment