TS logic fix4

This commit is contained in:
Krad
2021-12-23 13:20:56 +08:00
parent 98da5a2a8a
commit ad9ea3870e

View File

@@ -35,18 +35,7 @@ file(GLOB project_uis ./src/*.ui)
qt5_wrap_ui(ui_FILES ${project_uis})
file(GLOB project_res ./src/*.qrc)
#ADD_SUBDIRECTORY(./src/translations)
#set(TS_FILES
# ./src/translations/en_US.ts
# ./src/translations/zh_CN.ts)
#find_package(Qt5 COMPONENTS ${REQUIRED_LIBS} LinguistTools REQUIRED)
#qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
#add_executable(${PROJECT_NAME} ${project_headers} ${project_cpps} ${project_cxx} ${project_res} ${project_cc} ${project_c} ${ui_FILES} ${QM_FILES} )
#file(GLOB TS_FILES ./src/translations/*.ts)
SET_DIRECTORY_PROPERTIES(PROPERTIES CLEAN_NO_CUSTOM TRUE)
#file(GLOB TS_FILES ./src/translations/*.ts)
set(TS_FILES
./src/translations/en_US.ts
./src/translations/zh_CN.ts)
@@ -65,7 +54,7 @@ endforeach()
find_package(Qt5 COMPONENTS ${REQUIRED_LIBS} LinguistTools REQUIRED)
set(cpp_source_all ${project_headers} ${project_cpps} ${project_cxx} ${project_res} ${project_cc} ${project_c} )
qt5_create_translation(QM_FILES ${cpp_source_all} ${ui_FILES} ${TS_FILES})
add_executable(${PROJECT_NAME} ${cpp_source_all} ${ui_FILES} ${QM_FILES})
add_executable(${PROJECT_NAME} ${project_headers} ${project_cpps} ${project_cxx} ${project_res} ${project_cc} ${project_c} ${ui_FILES} ${QM_FILES} )
if(NOT UNIX)
find_program(POWERSHELL_PATH NAMES powershell)
endif()
@@ -77,7 +66,7 @@ foreach(_file ${TS_FILES})
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${POWERSHELL_PATH} " cp -Force" ${_rfile} ${backup})
endforeach()
add_executable(${PROJECT_NAME} ${project_headers} ${project_cpps} ${project_cxx} ${project_res} ${project_cc} ${project_c} ${ui_FILES} ${QM_FILES} )
if(UNIX AND USE_SHIMLIB)
link_directories(/usr/local/lib64)
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Widgets Qt5::Gui Qt5::OpenGL Qt5::Sql Qt5::VirtualKeyboard Qt5::Network pthread usct_shim dmapi log4c cunit ctomat hdf5 matio m)