mirror of
https://github.com/znc/znc.git
synced 2026-08-08 01:43:03 +02:00
Build cctz as part of znclib when not found
Because on cygwin otherwise it would be a separate dll
This commit is contained in:
+14
-13
@@ -272,23 +272,24 @@ endif()
|
||||
# TODO: verify that this find_package works; on Gentoo it's not currently (Jan
|
||||
# 2023) packaged, so in my tests it always falls back to submodule
|
||||
find_package(cctz QUIET)
|
||||
set(cctz_cc "")
|
||||
if (NOT cctz_FOUND)
|
||||
set(cctz_cc
|
||||
third_party/cctz/src/civil_time_detail.cc
|
||||
third_party/cctz/src/time_zone_fixed.cc
|
||||
third_party/cctz/src/time_zone_format.cc
|
||||
third_party/cctz/src/time_zone_if.cc
|
||||
third_party/cctz/src/time_zone_impl.cc
|
||||
third_party/cctz/src/time_zone_info.cc
|
||||
third_party/cctz/src/time_zone_libc.cc
|
||||
third_party/cctz/src/time_zone_lookup.cc
|
||||
third_party/cctz/src/time_zone_posix.cc
|
||||
third_party/cctz/src/zone_info_source.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/civil_time_detail.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/time_zone_fixed.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/time_zone_format.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/time_zone_if.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/time_zone_impl.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/time_zone_info.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/time_zone_libc.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/time_zone_lookup.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/time_zone_posix.cc
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/src/zone_info_source.cc
|
||||
)
|
||||
add_library(cctz STATIC EXCLUDE_FROM_ALL ${cctz_cc})
|
||||
add_library(cctz INTERFACE EXCLUDE_FROM_ALL)
|
||||
add_library(cctz::cctz ALIAS cctz)
|
||||
target_include_directories(cctz PUBLIC
|
||||
${PROJECT_SOURCE_DIR}/third_party/cctz/include)
|
||||
target_include_directories(cctz INTERFACE
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/third_party/cctz/include>)
|
||||
endif()
|
||||
|
||||
check_cxx_symbol_exists(getopt_long "getopt.h" HAVE_GETOPT_LONG)
|
||||
|
||||
+2
-1
@@ -25,7 +25,8 @@ set(znc_cpp "ZNCString.cpp" "znc.cpp" "IRCNetwork.cpp" "Translation.cpp"
|
||||
"HTTPSock.cpp" "Template.cpp" "ClientCommand.cpp" "Socket.cpp"
|
||||
"SHA256.cpp" "WebModules.cpp" "Listener.cpp" "Config.cpp" "ZNCDebug.cpp"
|
||||
"Threads.cpp" "Query.cpp" "SSLVerifyHost.cpp" "Message.cpp" "User.cpp")
|
||||
znc_add_library(znclib ${lib_type} ${znc_cpp} "Csocket.cpp" "versionc.cpp")
|
||||
znc_add_library(znclib ${lib_type} ${znc_cpp} "Csocket.cpp" "versionc.cpp"
|
||||
${cctz_cc})
|
||||
znc_add_executable(znc "main.cpp")
|
||||
target_link_libraries(znc PRIVATE znclib)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user