# Allow the developer to select if Dynamic or Static libraries are built
OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
-SET (LIB_TYPE STATIC)
IF (BUILD_SHARED_LIBS)
# User wants to build Dynamic Libraries,
# so change the LIB_TYPE variable to CMake keyword 'SHARED'
SET (LIB_TYPE SHARED)
+ELSE(BUILD_SHARED_LIBS)
+ SET (LIB_TYPE STATIC)
ENDIF (BUILD_SHARED_LIBS)
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
#cmakedefine WORDS_BIGENDIAN 1
#cmakedefine HAVE_DECL___BUILTIN_CLZLL 1
#cmakedefine HAVE_BSR64 1
+#cmakedefine BUILD_SHARED_LIBS 1
# include <config.h>
#endif
-#ifdef _WIN32
+#if _WIN32 && BUILD_SHARED_LIBS
# ifdef DLL_EXPORT
-# define AEC_SCOPE __declspec(dllexport)
+# define AEC_SCOPE __declspec(dllexport)
# else
-# define AEC_SCOPE extern __declspec(dllimport)
+# define AEC_SCOPE extern __declspec(dllimport)
# endif
-#endif
-#ifndef AEC_SCOPE
-# define AEC_SCOPE extern
+#else
+# define AEC_SCOPE extern
#endif
struct internal_state;