Fix link type mismatch on Windows and build a shared library by default.
This commit is contained in:
@@ -11,6 +11,9 @@ set(PROJECT_VERSION_MINOR 0)
|
||||
set(PROJECT_VERSION_PATCH 1)
|
||||
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
||||
|
||||
# Build a shared library by default
|
||||
option(BUILD_SHARED_LIBS "Build QHttpEngine as a shared library" ON)
|
||||
|
||||
set(BIN_INSTALL_DIR bin CACHE STRING "Binary runtime installation directory relative to the install prefix")
|
||||
set(LIB_INSTALL_DIR lib CACHE STRING "Library installation directory relative to the install prefix")
|
||||
set(INCLUDE_INSTALL_DIR include CACHE STRING "Header installation directory relative to the install prefix")
|
||||
|
||||
@@ -30,14 +30,16 @@
|
||||
#define QHTTPENGINE_VERSION_PATCH @PROJECT_VERSION_PATCH@
|
||||
#define QHTTPENGINE_VERSION "@PROJECT_VERSION@"
|
||||
|
||||
#if defined(QT_STATIC)
|
||||
# define QHTTPENGINE_EXPORT
|
||||
#else
|
||||
#cmakedefine BUILD_SHARED_LIBS
|
||||
|
||||
#if defined(BUILD_SHARED_LIBS)
|
||||
# if defined(QHTTPENGINE_LIBRARY)
|
||||
# define QHTTPENGINE_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define QHTTPENGINE_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define QHTTPENGINE_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // QHTTPENGINE_QHTTPENGINE_H
|
||||
|
||||
Reference in New Issue
Block a user