diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 0ff63c1e2d..4a2c2f6e3f 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -132,6 +132,7 @@ jobs: -DWARNING_REPORTING=ON \ -DPROCESSCONTAINERS=ON \ -DPROCESSCONTAINERS_RUNC=ON \ + -DBROADCAST=ON \ ${{steps.regexthunder.outputs.first_match}} cmake --build ${{matrix.build_type}}/build/Thunder --target install diff --git a/Source/extensions/broadcast/Module.cpp b/Source/extensions/broadcast/Module.cpp index 393d6a2670..3429c8717e 100644 --- a/Source/extensions/broadcast/Module.cpp +++ b/Source/extensions/broadcast/Module.cpp @@ -19,4 +19,8 @@ #include "Module.h" -MODULE_NAME_DECLARATION(BUILD_REFERENCE) +#ifdef BUILD_SHARED_LIBS + MODULE_NAME_DECLARATION(BUILD_REFERENCE) +#else + MODULE_NAME_ARCHIVE_DECLARATION +#endif diff --git a/Source/extensions/broadcast/broadcast.h b/Source/extensions/broadcast/broadcast.h index ca21eb62e7..abcf2052ce 100644 --- a/Source/extensions/broadcast/broadcast.h +++ b/Source/extensions/broadcast/broadcast.h @@ -23,6 +23,7 @@ #error "Please define a MODULE_NAME that describes the binary/library you are building." #endif +#include "Module.h" #include "Definitions.h" #include "Descriptors.h" #include "MPEGDescriptor.h" diff --git a/Source/extensions/broadcast/test/BroadcastTester.cpp b/Source/extensions/broadcast/test/BroadcastTester.cpp index 7d72404f85..c83652e003 100644 --- a/Source/extensions/broadcast/test/BroadcastTester.cpp +++ b/Source/extensions/broadcast/test/BroadcastTester.cpp @@ -18,12 +18,8 @@ * limitations under the License. */ -#define MODULE_NAME BroadcastTest +#include "Module.h" -#include -#include - -MODULE_NAME_DECLARATION(BUILD_REFERENCE) using namespace Thunder; void printHelp(){ diff --git a/Source/extensions/broadcast/test/CMakeLists.txt b/Source/extensions/broadcast/test/CMakeLists.txt index e495b179fb..ce0dd41f33 100644 --- a/Source/extensions/broadcast/test/CMakeLists.txt +++ b/Source/extensions/broadcast/test/CMakeLists.txt @@ -18,12 +18,15 @@ include_directories(${CMAKE_CURRENT_LIST_DIR}/../../broadcast) include_directories($) -add_executable(BroadcastTester BroadcastTester.cpp) +add_executable(BroadcastTester + Module.cpp + BroadcastTester.cpp) target_link_libraries(BroadcastTester PRIVATE - ${NAMESPACE}Broadcast::${NAMESPACE}Broadcast + CompileSettingsDebug::CompileSettingsDebug ${NAMESPACE}Core::${NAMESPACE}Core -) + ${NAMESPACE}Broadcast::${NAMESPACE}Broadcast +) install(TARGETS BroadcastTester DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Test) diff --git a/Source/extensions/broadcast/test/Module.cpp b/Source/extensions/broadcast/test/Module.cpp new file mode 100644 index 0000000000..9df9bdf60c --- /dev/null +++ b/Source/extensions/broadcast/test/Module.cpp @@ -0,0 +1,22 @@ +/* + * If not stated otherwise in this file or this component's LICENSE file the + * following copyright and licenses apply: + * + * Copyright 2021 Metrological + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Module.h" + +MODULE_NAME_DECLARATION(BUILD_REFERENCE) diff --git a/Source/extensions/broadcast/test/Module.h b/Source/extensions/broadcast/test/Module.h new file mode 100644 index 0000000000..3c38c291a9 --- /dev/null +++ b/Source/extensions/broadcast/test/Module.h @@ -0,0 +1,32 @@ +/* + * If not stated otherwise in this file or this component's LICENSE file the + * following copyright and licenses apply: + * + * Copyright 2021 Metrological + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #pragma once + + #ifndef MODULE_NAME + #define MODULE_NAME BroadcastTest + #endif + + #include + #include + + #if defined(__WINDOWS__) && defined(BROADCAST_EXPORTS) + #undef EXTERNAL + #define EXTERNAL EXTERNAL_EXPORT + #endif