diff --git a/CMakeModules/NSIS.template.in b/CMakeModules/NSIS.template.in index 0390d4fd4..6e6b64df9 100644 --- a/CMakeModules/NSIS.template.in +++ b/CMakeModules/NSIS.template.in @@ -277,7 +277,7 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER File "${INSTALL_PATH}\bin\libtomahawk_breakpad.dll" File "${INSTALL_PATH}\bin\libtomahawk_portfwd.dll" - File "${INSTALL_PATH}\bin\libtomahawklib.dll" + File "${INSTALL_PATH}\bin\libtomahawk.dll" ; plugins File "${INSTALL_PATH}\lib\libtomahawk_*_*.dll" !endif @@ -288,7 +288,7 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER File "${BUILD_PATH}\tomahawk_crash_reporter.exe" File "${BUILD_PATH}\libtomahawk_breakpad.dll" - File "${BUILD_PATH}\libtomahawklib.dll" + File "${BUILD_PATH}\libtomahawk.dll" File "${BUILD_PATH}\libtomahawk_portfwd.dll" ; plugins File "${BUILD_PATH}\libtomahawk_*_*.dll" diff --git a/src/AclRegistryImpl.h b/src/AclRegistryImpl.h index 85b617bac..96b808202 100644 --- a/src/AclRegistryImpl.h +++ b/src/AclRegistryImpl.h @@ -22,7 +22,6 @@ #include "AclRegistry.h" #include "HeadlessCheck.h" -#include "DllMacro.h" #include #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6ca16f8b6..5ae0c8655 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -167,18 +167,15 @@ qt_add_resources( RC_SRCS "../resources.qrc" ) SET( final_src ${final_src} ${tomahawkUI_H} ${tomahawkMoc} ${tomahawkSources} ${RC_SRCS} ) -IF( UNIX AND NOT APPLE ) - ADD_EXECUTABLE( tomahawk ${final_src} ) -ENDIF( UNIX AND NOT APPLE ) -IF( APPLE ) - ADD_EXECUTABLE( tomahawk MACOSX_BUNDLE ${final_src} ) - SET_TARGET_PROPERTIES(tomahawk PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/Info.plist") -ENDIF( APPLE ) -IF( WIN32 ) - ADD_EXECUTABLE( tomahawk WIN32 ${final_src} ) -ENDIF( WIN32 ) -SET_TARGET_PROPERTIES(tomahawk PROPERTIES AUTOMOC TRUE) +ADD_EXECUTABLE( tomahawk WIN32 MACOSX_BUNDLE ${final_src} ) +SET_TARGET_PROPERTIES(tomahawk + PROPERTIES + AUTOMOC TRUE + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/Info.plist" +) + + qt5_use_modules(tomahawk Core Widgets Network Sql WebKitWidgets) MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" ) diff --git a/src/ConfigDelegateBase.h b/src/ConfigDelegateBase.h index 1a2587e91..f530656a8 100644 --- a/src/ConfigDelegateBase.h +++ b/src/ConfigDelegateBase.h @@ -19,14 +19,12 @@ #ifndef CONFIGDELEGATEBASE_H #define CONFIGDELEGATEBASE_H -#include "DllMacro.h" - #include #define PADDING 4 class QPainter; -class Q_DECL_EXPORT ConfigDelegateBase : public QStyledItemDelegate +class ConfigDelegateBase : public QStyledItemDelegate { Q_OBJECT public: diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index 28a2798f0..51e8393e6 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -6,6 +6,7 @@ add_definitions( ${QT_DEFINITIONS} ) add_definitions( -DQT_SHARED ) add_definitions( -DDLLEXPORT_PRO ) add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS ) +add_definitions( -DPORTFWDDLLEXPORT_STATIC ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) @@ -459,6 +460,7 @@ set_target_properties( AUTOMOC TRUE VERSION ${TOMAHAWK_VERSION_SHORT} SOVERSION ${TOMAHAWK_VERSION_SHORT} + OUTPUT_NAME "tomahawk" ) diff --git a/thirdparty/libportfwd/CMakeLists.txt b/thirdparty/libportfwd/CMakeLists.txt index 102524183..870b14807 100644 --- a/thirdparty/libportfwd/CMakeLists.txt +++ b/thirdparty/libportfwd/CMakeLists.txt @@ -8,19 +8,19 @@ SET(NATPMP_DIR "third-party/libnatpmp-20100808") ADD_DEFINITIONS(-Wall -O2 -DNDEBUG) IF(WIN32) - ADD_DEFINITIONS(-DWIN32 -DMINIUPNP_EXPORTS ) + ADD_DEFINITIONS(-DWIN32 ) ELSE() ADD_DEFINITIONS(-fPIC) ENDIF() INCLUDE_DIRECTORIES( ${MINIUPNP_DIR} include ${QT_INCLUDES} ) SET( CMAKE_C_FLAGS ${CLEAN_C_FLAGS} ) -ADD_DEFINITIONS( -DPORTFWDDLLEXPORT_PRO ) +ADD_DEFINITIONS( -DPORTFWDDLLEXPORT_STATIC -DSTATICLIB ) if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") ADD_DEFINITIONS( -DMACOSX -D_DARWIN_C_SOURCE ) endif () -ADD_LIBRARY(tomahawk_portfwd SHARED +ADD_LIBRARY(tomahawk_portfwd STATIC # the needed bits of miniupnpc (no python module, no tests, no cli) ${MINIUPNP_DIR}/connecthostport.c ${MINIUPNP_DIR}/igd_desc_parse.c diff --git a/thirdparty/libportfwd/include/portfwd/portfwddllmacro.h b/thirdparty/libportfwd/include/portfwd/portfwddllmacro.h index 7faddc3d3..c74702b90 100644 --- a/thirdparty/libportfwd/include/portfwd/portfwddllmacro.h +++ b/thirdparty/libportfwd/include/portfwd/portfwddllmacro.h @@ -21,12 +21,16 @@ #include -#ifndef PORTFWDDLLEXPORT -# if defined (PORTFWDDLLEXPORT_PRO) -# define PORTFWDDLLEXPORT Q_DECL_EXPORT +# if defined (PORTFWDDLLEXPORT_STATIC) +# define PORTFWDDLLEXPORT # else -# define PORTFWDDLLEXPORT Q_DECL_IMPORT +# ifndef PORTFWDDLLEXPORT +# if defined (PORTFWDDLLEXPORT_PRO) +# define PORTFWDDLLEXPORT Q_DECL_EXPORT +# else +# define PORTFWDDLLEXPORT Q_DECL_IMPORT +# endif +# endif # endif -#endif #endif \ No newline at end of file