Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use WINDOWS_EXPORT_ALL_SYMBOLS instead of __declspec(dllexport) #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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.")
Expand Down Expand Up @@ -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)
Expand All @@ -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()

#
Expand Down
25 changes: 4 additions & 21 deletions include/HSS1394.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string> // STL string class
Expand Down Expand Up @@ -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;
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand Down