CMake: Exclude -Wno-missing-declarations on MSVC
This commit is contained in:
parent
254c442a69
commit
7da0df2178
|
@ -3,7 +3,9 @@ set(SOURCES KDSingleApplication/src/kdsingleapplication.cpp KDSingleApplication/
|
||||||
set(HEADERS KDSingleApplication/src/kdsingleapplication.h KDSingleApplication/src/kdsingleapplication_localsocket_p.h)
|
set(HEADERS KDSingleApplication/src/kdsingleapplication.h KDSingleApplication/src/kdsingleapplication_localsocket_p.h)
|
||||||
qt_wrap_cpp(MOC ${HEADERS})
|
qt_wrap_cpp(MOC ${HEADERS})
|
||||||
add_library(kdsingleapplication STATIC ${SOURCES} ${MOC})
|
add_library(kdsingleapplication STATIC ${SOURCES} ${MOC})
|
||||||
target_compile_options(kdsingleapplication PRIVATE -Wno-missing-declarations)
|
if(NOT MSVC)
|
||||||
|
target_compile_options(kdsingleapplication PRIVATE -Wno-missing-declarations)
|
||||||
|
endif()
|
||||||
target_compile_definitions(kdsingleapplication PRIVATE -DKDSINGLEAPPLICATION_STATIC_BUILD)
|
target_compile_definitions(kdsingleapplication PRIVATE -DKDSINGLEAPPLICATION_STATIC_BUILD)
|
||||||
target_include_directories(kdsingleapplication PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(kdsingleapplication PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
target_link_libraries(kdsingleapplication PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
target_link_libraries(kdsingleapplication PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
||||||
|
|
|
@ -21,7 +21,9 @@ endif()
|
||||||
|
|
||||||
add_library(libstrawberry-tagreader STATIC ${PROTO_SOURCES} ${SOURCES})
|
add_library(libstrawberry-tagreader STATIC ${PROTO_SOURCES} ${SOURCES})
|
||||||
|
|
||||||
target_compile_options(libstrawberry-tagreader PRIVATE -Wno-missing-declarations)
|
if(NOT MSVC)
|
||||||
|
target_compile_options(libstrawberry-tagreader PRIVATE -Wno-missing-declarations)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(libstrawberry-tagreader SYSTEM PRIVATE
|
target_include_directories(libstrawberry-tagreader SYSTEM PRIVATE
|
||||||
${GLIB_INCLUDE_DIRS}
|
${GLIB_INCLUDE_DIRS}
|
||||||
|
|
Loading…
Reference in New Issue