diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 54 |
1 files changed, 37 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a2d6dd39..8f3cb28d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,7 +391,6 @@ set (wsjt_FSRCS lib/astro0.f90 lib/avecho.f90 lib/averms.f90 - lib/ft4/averaged_mf.f90 lib/azdist.f90 lib/badmsg.f90 lib/ft8/baseline.f90 @@ -528,7 +527,6 @@ set (wsjt_FSRCS lib/msk144sim.f90 lib/mskrtd.f90 lib/nuttal_window.f90 - lib/ft4/ft4b.f90 lib/ft4/ft4sim.f90 lib/ft4/ft4sim_mult.f90 lib/ft4/ft4_downsample.f90 @@ -574,6 +572,7 @@ set (wsjt_FSRCS lib/sync64.f90 lib/sync65.f90 lib/ft4/getcandidates4.f90 + lib/ft4/get_ft4_bitmetrics.f90 lib/ft8/sync8.f90 lib/ft8/sync8d.f90 lib/ft4/sync4d.f90 @@ -856,9 +855,6 @@ if (Boost_NO_SYSTEM_PATHS) set (BOOST_ROOT ${PROJECT_SOURCE_DIR}/boost) endif () find_package (Boost 1.63 REQUIRED) -if (Boost_FOUND) - include_directories (${Boost_INCLUDE_DIRS}) -endif () # # OpenMP @@ -889,10 +885,7 @@ message (STATUS "hamlib_LIBRARY_DIRS: ${hamlib_LIBRARY_DIRS}") # # Widgets finds its own dependencies. -find_package (Qt5Widgets 5 REQUIRED) -find_package (Qt5Multimedia 5 REQUIRED) -find_package (Qt5PrintSupport 5 REQUIRED) -find_package (Qt5Sql 5 REQUIRED) +find_package (Qt5 COMPONENTS Widgets Multimedia PrintSupport Sql LinguistTools REQUIRED) if (WIN32) add_definitions (-DQT_NEEDS_QTMAIN) @@ -1098,11 +1091,41 @@ add_custom_target (ctags COMMAND ${CTAGS} -o ${CMAKE_SOURCE_DIR}/tags -R ${sourc add_custom_target (etags COMMAND ${ETAGS} -o ${CMAKE_SOURCE_DIR}/TAGS -R ${sources}) +# Qt i18n +set (LANGUAGES + en_GB + pt_PT + ) +foreach (lang_ ${LANGUAGES}) + file (TO_NATIVE_PATH translations/wsjtx_${lang_}.ts ts_) + list (APPEND TS_FILES ${ts_}) +endforeach () +if (UPDATE_TRANSLATIONS) + message (STATUS "UPDATE_TRANSLATIONS option is set.") + qt5_create_translation ( + QM_FILES ${wsjt_qt_UISRCS} ${wsjtx_UISRCS} ${wsjt_qt_CXXSRCS} ${wsjtx_CXXSRCS} + ${TS_FILES} + ) +else () + qt5_add_translation (QM_FILES ${TS_FILES}) +endif () +add_custom_target (translations DEPENDS ${QM_FILES}) +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 function (add_resources resources path) foreach (resource_file_ ${ARGN}) get_filename_component (name_ ${resource_file_} NAME) - file (TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${resource_file_} source_) + if (IS_ABSOLUTE "${resource_file_}") + file (TO_NATIVE_PATH ${resource_file_} source_) + else () + file (TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${resource_file_} source_) + endif () file (TO_NATIVE_PATH ${path}/${name_} dest_) set (resources_ "${resources_}\n <file alias=\"${dest_}\">${source_}</file>") set (${resources} ${${resources}}${resources_} PARENT_SCOPE) @@ -1111,6 +1134,7 @@ endfunction (add_resources resources path) add_resources (wsjtx_RESOURCES "" ${TOP_LEVEL_RESOURCES}) add_resources (wsjtx_RESOURCES /Palettes ${PALETTE_FILES}) +add_resources (wsjtx_RESOURCES /Translations ${QM_FILES}) configure_file (wsjtx.qrc.in wsjtx.qrc @ONLY) @@ -1131,7 +1155,6 @@ if (WIN32) wrap_ax_server (GENAXSRCS ${AXSERVERSRCS}) endif (WIN32) - # # targets # @@ -1250,6 +1273,9 @@ target_link_libraries (jt49sim wsjt_fort wsjt_cxx) add_executable (allsim lib/allsim.f90 wsjtx.rc) target_link_libraries (allsim wsjt_fort wsjt_cxx) +add_executable (rtty_spec lib/rtty_spec.f90 wsjtx.rc) +target_link_libraries (rtty_spec wsjt_fort wsjt_cxx) + add_executable (jt65code lib/jt65code.f90 wsjtx.rc) target_link_libraries (jt65code wsjt_fort wsjt_cxx) @@ -1292,15 +1318,9 @@ target_link_libraries (msk144sim wsjt_fort wsjt_cxx) add_executable (ft4sim lib/ft4/ft4sim.f90 wsjtx.rc) target_link_libraries (ft4sim wsjt_fort wsjt_cxx) -add_executable (averaged_mf lib/ft4/averaged_mf.f90 wsjtx.rc) -target_link_libraries (averaged_mf wsjt_fort wsjt_cxx) - add_executable (ft4sim_mult lib/ft4/ft4sim_mult.f90 wsjtx.rc) target_link_libraries (ft4sim_mult wsjt_fort wsjt_cxx) -add_executable (ft4d lib/ft4/ft4d.f90 wsjtx.rc) -target_link_libraries (ft4d wsjt_fort wsjt_cxx) - add_executable (record_time_signal Audio/tools/record_time_signal.cpp) target_link_libraries (record_time_signal wsjt_cxx wsjt_qtmm wsjt_qt) |
