mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
Fix Boost linking
This commit is contained in:
parent
80feb93e6f
commit
24b2487abe
@ -865,13 +865,10 @@ find_program(ETAGS etags)
|
|||||||
#
|
#
|
||||||
# Boost
|
# Boost
|
||||||
#
|
#
|
||||||
# set (Boost_NO_SYSTEM_PATHS TRUE)
|
if (WIN32)
|
||||||
# if (Boost_NO_SYSTEM_PATHS)
|
|
||||||
# set (BOOST_ROOT ${PROJECT_SOURCE_DIR}/boost)
|
|
||||||
# endif ()
|
|
||||||
set (Boost_USE_STATIC_LIBS OFF)
|
set (Boost_USE_STATIC_LIBS OFF)
|
||||||
|
endif ()
|
||||||
find_package (Boost 1.63 REQUIRED COMPONENTS log_setup log)
|
find_package (Boost 1.63 REQUIRED COMPONENTS log_setup log)
|
||||||
add_definitions (-DBOOST_SYSTEM_NO_DEPRECATED)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# OpenMP
|
# OpenMP
|
||||||
@ -1161,11 +1158,6 @@ else ()
|
|||||||
endif ()
|
endif ()
|
||||||
add_custom_target (translations DEPENDS ${QM_FILES})
|
add_custom_target (translations DEPENDS ${QM_FILES})
|
||||||
set_property (DIRECTORY PROPERTY CLEAN_NO_CUSTOM TRUE)
|
set_property (DIRECTORY PROPERTY CLEAN_NO_CUSTOM TRUE)
|
||||||
# do this after i18n to stop lupdate walking the boost tree which it
|
|
||||||
# chokes on
|
|
||||||
if (Boost_FOUND)
|
|
||||||
include_directories (${Boost_INCLUDE_DIRS})
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# embedded resources
|
# embedded resources
|
||||||
function (add_resources resources path)
|
function (add_resources resources path)
|
||||||
@ -1211,6 +1203,7 @@ endif (WIN32)
|
|||||||
|
|
||||||
# build a library of package functionality (without and optionally with OpenMP support)
|
# build a library of package functionality (without and optionally with OpenMP support)
|
||||||
add_library (wsjt_cxx STATIC ${wsjt_CSRCS} ${wsjt_CXXSRCS})
|
add_library (wsjt_cxx STATIC ${wsjt_CSRCS} ${wsjt_CXXSRCS})
|
||||||
|
target_compile_definitions (wsjt_cxx PUBLIC BOOST_LOG_DYN_LINK)
|
||||||
target_link_libraries (wsjt_cxx Boost::log_setup)
|
target_link_libraries (wsjt_cxx Boost::log_setup)
|
||||||
|
|
||||||
# build an OpenMP variant of the Fortran library routines
|
# build an OpenMP variant of the Fortran library routines
|
||||||
@ -1249,7 +1242,7 @@ target_link_libraries (qcp Qt5::Widgets Qt5::PrintSupport)
|
|||||||
# build a library of package Qt functionality
|
# build a library of package Qt functionality
|
||||||
add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS})
|
add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS})
|
||||||
# set wsjtx_udp exports to static variants
|
# set wsjtx_udp exports to static variants
|
||||||
target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE)
|
target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE BOOST_LOG_DYN_LINK)
|
||||||
target_link_libraries (wsjt_qt Boost::log qcp Qt5::Widgets Qt5::Network Qt5::Sql)
|
target_link_libraries (wsjt_qt Boost::log qcp Qt5::Widgets Qt5::Network Qt5::Sql)
|
||||||
target_include_directories (wsjt_qt BEFORE PRIVATE ${hamlib_INCLUDE_DIRS})
|
target_include_directories (wsjt_qt BEFORE PRIVATE ${hamlib_INCLUDE_DIRS})
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
@ -132,10 +132,11 @@ WSJTXLogging::WSJTXLogging ()
|
|||||||
keywords::auto_flush = false
|
keywords::auto_flush = false
|
||||||
#if BOOST_VERSION / 100 >= 1070
|
#if BOOST_VERSION / 100 >= 1070
|
||||||
, keywords::file_name = app_data.absoluteFilePath ("wsjtx_syslog.log").toStdString ()
|
, keywords::file_name = app_data.absoluteFilePath ("wsjtx_syslog.log").toStdString ()
|
||||||
, keywords::target_file_name = app_data.absoluteFilePath ("logs/wsjtx_syslog_%Y-%m.log").toStdString ()
|
, keywords::target_file_name =
|
||||||
#else
|
#else
|
||||||
, keywords::file_name = app_data.absoluteFilePath ("logs/wsjtx_syslog_%Y-%m.log").toStdString ()
|
, keywords::file_name =
|
||||||
#endif
|
#endif
|
||||||
|
app_data.absoluteFilePath ("logs/wsjtx_syslog_%Y-%m.log").toStdString ()
|
||||||
, keywords::time_based_rotation = sinks::file::rotation_at_time_point (gregorian::greg_day (1), 0, 0, 0)
|
, keywords::time_based_rotation = sinks::file::rotation_at_time_point (gregorian::greg_day (1), 0, 0, 0)
|
||||||
, keywords::open_mode = std::ios_base::out | std::ios_base::app
|
, keywords::open_mode = std::ios_base::out | std::ios_base::app
|
||||||
, keywords::enable_final_rotation = false
|
, keywords::enable_final_rotation = false
|
||||||
@ -148,9 +149,7 @@ WSJTXLogging::WSJTXLogging ()
|
|||||||
keywords::max_size = 40 * 1024 * 1024
|
keywords::max_size = 40 * 1024 * 1024
|
||||||
, keywords::min_free_space = 1024 * 1024 * 1024
|
, keywords::min_free_space = 1024 * 1024 * 1024
|
||||||
, keywords::max_files = 12
|
, keywords::max_files = 12
|
||||||
#if BOOST_VERSION / 100 >= 1070
|
|
||||||
, keywords::target = app_data.absoluteFilePath ("logs").toStdString ()
|
, keywords::target = app_data.absoluteFilePath ("logs").toStdString ()
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
sys_sink->locked_backend ()->scan_for_files ();
|
sys_sink->locked_backend ()->scan_for_files ();
|
||||||
|
Loading…
Reference in New Issue
Block a user