TS logic fix4
This commit is contained in:
@@ -35,18 +35,7 @@ file(GLOB project_uis ./src/*.ui)
|
|||||||
qt5_wrap_ui(ui_FILES ${project_uis})
|
qt5_wrap_ui(ui_FILES ${project_uis})
|
||||||
file(GLOB project_res ./src/*.qrc)
|
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)
|
SET_DIRECTORY_PROPERTIES(PROPERTIES CLEAN_NO_CUSTOM TRUE)
|
||||||
#file(GLOB TS_FILES ./src/translations/*.ts)
|
|
||||||
set(TS_FILES
|
set(TS_FILES
|
||||||
./src/translations/en_US.ts
|
./src/translations/en_US.ts
|
||||||
./src/translations/zh_CN.ts)
|
./src/translations/zh_CN.ts)
|
||||||
@@ -65,7 +54,7 @@ endforeach()
|
|||||||
find_package(Qt5 COMPONENTS ${REQUIRED_LIBS} LinguistTools REQUIRED)
|
find_package(Qt5 COMPONENTS ${REQUIRED_LIBS} LinguistTools REQUIRED)
|
||||||
set(cpp_source_all ${project_headers} ${project_cpps} ${project_cxx} ${project_res} ${project_cc} ${project_c} )
|
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})
|
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)
|
if(NOT UNIX)
|
||||||
find_program(POWERSHELL_PATH NAMES powershell)
|
find_program(POWERSHELL_PATH NAMES powershell)
|
||||||
endif()
|
endif()
|
||||||
@@ -77,7 +66,7 @@ foreach(_file ${TS_FILES})
|
|||||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${POWERSHELL_PATH} " cp -Force" ${_rfile} ${backup})
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${POWERSHELL_PATH} " cp -Force" ${_rfile} ${backup})
|
||||||
endforeach()
|
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)
|
if(UNIX AND USE_SHIMLIB)
|
||||||
link_directories(/usr/local/lib64)
|
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)
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user