Skip to content

Commit

Permalink
build fix windows + osx
Browse files Browse the repository at this point in the history
  • Loading branch information
echoby committed Jul 29, 2021
1 parent 2226560 commit 678ee13
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ set_target_properties(qhttpengine PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
)

if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4456")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251")
elseif (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field") # 3rdparty/qhttpengine/src/src/range_p.h
endif()

target_include_directories(qhttpengine PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
Expand Down

0 comments on commit 678ee13

Please sign in to comment.