diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c3d708..755d667 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: with: # This should always match the mininum required version in # our CMakeLists.txt - cmake-version: '3.1.x' + cmake-version: '3.4.x' - name: "[Windows] Set up MSVC Developer Command Prompt" if: runner.os == 'Windows' diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f8e54c..037d200 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0) +cmake_minimum_required(VERSION 3.4.0) project(HSS1394 VERSION 1.0.0) set(CMAKE_PROJECT_HOMEPAGE_URL "https://www.mixxx.org") set(CMAKE_PROJECT_DESCRIPTION "High-speed MIDI-over-Firewire device access library for Windows and macOS.") @@ -36,9 +36,6 @@ if(APPLE) elseif(WIN32) target_sources(hss1394 PRIVATE src/1394API_VHPD1394.cpp) target_compile_definitions(hss1394 PRIVATE "_WIN32_") - if(BUILD_SHARED_LIBS) - target_compile_definitions(hss1394 PRIVATE "HSS1394_EXPORT_DLL") - endif() # Add header-only library dependency ST1394_ASIO target_include_directories(hss1394 SYSTEM PRIVATE lib/ST1394_ASIO) @@ -55,8 +52,12 @@ elseif(WIN32) ) target_include_directories(vhpd1394 SYSTEM PUBLIC lib/VHPD1394) target_link_libraries(hss1394 PRIVATE vhpd1394) + + set_target_properties(hss1394 PROPERTIES + WINDOWS_EXPORT_ALL_SYMBOLS TRUE + ) else() - message(FATAL_ERROR "Operating system not supported") + message(FATAL_ERROR "Operating system not supported") endif() # diff --git a/include/HSS1394.h b/include/HSS1394.h index b732f39..7aa13f6 100755 --- a/include/HSS1394.h +++ b/include/HSS1394.h @@ -37,23 +37,6 @@ #ifndef _HSS1394_ #define _HSS1394_ - -#if defined(_WIN32) -#if defined(HSS1394_EXPORT_DLL) -#define HSS1394_CLASS_CONVENTION __declspec(dllexport) -#elif defined(HSS1394_IMPORT_DLL) -#define HSS1394_CLASS_CONVENTION __declspec(dllimport) -#else -#define HSS1394_CLASS_CONVENTION // static import -#endif - -#else // _WIN32 - -#define HSS1394_CLASS_CONVENTION // static import - -#endif // _WIN32 - - //*** Includes //***************************************************************************** #include // STL string class @@ -85,7 +68,7 @@ namespace hss1394 { //! HSS1394 interface changes - ie. connections appear or disappear on the //! network. //----------------------------------------------------------------------------- - class HSS1394_CLASS_CONVENTION Listener { + class Listener { public: //! ::Do method is called when the nodes in the HSS1394 network have changed. virtual void Do(void) = 0; @@ -95,7 +78,7 @@ namespace hss1394 { // ChannelListener:: //! Callback object for an incomming data channel. //----------------------------------------------------------------------------- - class HSS1394_CLASS_CONVENTION ChannelListener { + class ChannelListener { public: // :: Process is called when data has arrived. The arguments present //! the data. On completion of this call, pBuffer is no longer valid. @@ -117,7 +100,7 @@ namespace hss1394 { //! Abstraction of a channel endpoint at the host communicating with a //! remote HSS1394 node. //----------------------------------------------------------------------------- - class HSS1394_CLASS_CONVENTION Channel { + class Channel { public: //! Stop data transmission/reception. After this call all send and //! receive calls will fail with a zero return. @@ -177,7 +160,7 @@ namespace hss1394 { // Node:: //! Singleton High-speed serial over 1394 host node interface. //----------------------------------------------------------------------------- - class HSS1394_CLASS_CONVENTION Node { + class Node { protected: static Node *mspInstance; //!< Singleton instance of class