Merge branch 'fix/sonar-cmake' into staged

This commit is contained in:
xiaoyifang 2022-12-15 10:50:13 +08:00
commit 58a0bc74af
2 changed files with 11 additions and 2 deletions

View file

@ -76,8 +76,8 @@ jobs:
- name: Run build-wrapper
run: |
cmake . -DCMAKE_BUILD_TYPE=Release
cmake --build .
cmake -S . -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
job3:
name: macos Build and analyze
runs-on: macos-12

View file

@ -12,9 +12,13 @@ if(UNIX AND NOT APPLE)
endif()
if (APPLE)
if(WITH_EPWING_SUPPORT)
add_subdirectory(thirdparty/eb)
endif()
include_directories(/usr/local/include /opt/homebrew/include)
endif ()
project(goldendict
VERSION 22.11.20
LANGUAGES CXX C)
@ -477,6 +481,9 @@ if(MSVC)
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC
${CMAKE_SOURCE_DIR}/winlibs/include/
)
set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
@ -491,8 +498,10 @@ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
)
if(APPLE)
if(WITH_EPWING_SUPPORT)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE eb)
endif()
endif()
if(UNIX)
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE