mirror of
https://github.com/jellyfin/jellyfin-media-player.git
synced 2024-11-23 05:59:43 +00:00
Use CXX_STANDARD 14 and centralize the setting to utils.cmake
This commit is contained in:
parent
fbb795dd46
commit
09e7605b68
@ -166,3 +166,8 @@ MACRO(ENABLE_IF_LINKS _variable _flag)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
#############################################################
|
||||
function(std_target_properties target)
|
||||
set_target_properties(${target} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
|
||||
endfunction()
|
||||
|
2
external/qhttp/CMakeLists.txt
vendored
2
external/qhttp/CMakeLists.txt
vendored
@ -7,4 +7,4 @@ add_definitions(-DQHTTP_EXPORT)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
add_library(qhttp STATIC ${HTTP_SRC} 3rdparty/http-parser/http_parser.c)
|
||||
target_link_libraries(qhttp)
|
||||
set_target_properties(qhttp PROPERTIES CXX_STANDARD 11)
|
||||
std_target_properties(qhttp)
|
||||
|
@ -131,13 +131,11 @@ endif()
|
||||
|
||||
get_property(BUNDLED_FILES GLOBAL PROPERTY CONFIG_BUNDLED_FILES)
|
||||
add_executable(${MAIN_TARGET} WIN32 MACOSX_BUNDLE ${SOURCES} ${BUNDLED_FILES} ${RESOURCE_FILES})
|
||||
|
||||
std_target_properties(${MAIN_TARGET})
|
||||
set_target_properties(${MAIN_TARGET} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/bundle/osx/Info.plist.in
|
||||
INSTALL_RPATH "${QTROOT}/lib"
|
||||
OUTPUT_NAME ${MAIN_NAME}
|
||||
CXX_STANDARD 11
|
||||
CXX_STANDARD_REQUIRED TRUE
|
||||
)
|
||||
|
||||
clang_tidy(${MAIN_TARGET})
|
||||
|
@ -9,6 +9,6 @@ add_library(shared STATIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Names.cpp Names.h
|
||||
)
|
||||
|
||||
set_target_properties(shared PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED TRUE)
|
||||
std_target_properties(shared)
|
||||
|
||||
clang_tidy(shared)
|
||||
|
@ -13,9 +13,8 @@ add_executable(${HELPER_TARGET} WIN32
|
||||
)
|
||||
|
||||
target_link_libraries(${HELPER_TARGET} ${Qt5Core_LIBRARIES} ${Qt5Network_LIBRARIES} qslog shared)
|
||||
std_target_properties(${HELPER_TARGET})
|
||||
set_target_properties(${HELPER_TARGET} PROPERTIES
|
||||
CXX_STANDARD 11
|
||||
CXX_STANDARD_REQUIRED TRUE
|
||||
OUTPUT_NAME ${HELPER_NAME}
|
||||
)
|
||||
|
||||
|
@ -4,8 +4,5 @@ add_executable(socket-client
|
||||
SocketClient.cpp
|
||||
$<TARGET_OBJECTS:shared>
|
||||
)
|
||||
set_target_properties(socket-client PROPERTIES
|
||||
CXX_STANDARD 11
|
||||
CXX_STANDARD_REQUIRED TRUE
|
||||
)
|
||||
target_link_libraries(socket-client ${Qt5Network_LIBRARIES} ${Qt5Core_LIBRARIES} qslog)
|
||||
std_target_properties(socket-client)
|
||||
target_link_libraries(socket-client ${Qt5Network_LIBRARIES} ${Qt5Core_LIBRARIES} qslog)
|
||||
|
Loading…
Reference in New Issue
Block a user