chore: add mocks as header set if supported (#6561)
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
- Dev: The LuaLS meta files moved from `docs/plugin-meta.lua` to `docs/lua-meta/globals.lua`. (#6530)
|
- Dev: The LuaLS meta files moved from `docs/plugin-meta.lua` to `docs/lua-meta/globals.lua`. (#6530)
|
||||||
- Dev: Compile time definitions for `Windows.h` are now conditional based on `WIN32` instead of `MSVC`. (#6534)
|
- Dev: Compile time definitions for `Windows.h` are now conditional based on `WIN32` instead of `MSVC`. (#6534)
|
||||||
- Dev: Refactored split container nodes to use shared pointers. (#6435)
|
- Dev: Refactored split container nodes to use shared pointers. (#6435)
|
||||||
|
- Dev: Mock headers are now added as a header set if supported by CMake. (#6561)
|
||||||
|
|
||||||
## 2.5.4
|
## 2.5.4
|
||||||
|
|
||||||
|
|||||||
+25
-1
@@ -4,4 +4,28 @@ add_library(chatterino-mocks INTERFACE)
|
|||||||
|
|
||||||
target_include_directories(chatterino-mocks INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
target_include_directories(chatterino-mocks INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME} INTERFACE gmock)
|
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
|
||||||
|
target_sources(chatterino-mocks INTERFACE
|
||||||
|
FILE_SET HEADERS
|
||||||
|
BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||||
|
FILES
|
||||||
|
include/mocks/BaseApplication.hpp
|
||||||
|
include/mocks/Channel.hpp
|
||||||
|
include/mocks/ChatterinoBadges.hpp
|
||||||
|
include/mocks/DisabledStreamerMode.hpp
|
||||||
|
include/mocks/EmoteController.hpp
|
||||||
|
include/mocks/EmptyApplication.hpp
|
||||||
|
include/mocks/Helix.hpp
|
||||||
|
include/mocks/LinkResolver.hpp
|
||||||
|
include/mocks/Logging.hpp
|
||||||
|
include/mocks/TwitchIrcServer.hpp
|
||||||
|
include/mocks/TwitchUsers.hpp
|
||||||
|
include/mocks/UserData.hpp
|
||||||
|
)
|
||||||
|
set_target_properties(chatterino-mocks
|
||||||
|
PROPERTIES
|
||||||
|
VERIFY_INTERFACE_HEADER_SETS ON
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME} INTERFACE gmock chatterino-lib)
|
||||||
|
|||||||
Reference in New Issue
Block a user