comparison CMakeLists.txt @ 195:975a3f0965e2

locale: only attempt loading locales after QApplication is init'd also the general application stuff and anime list is separated in settings
author Paper <mrpapersonic@gmail.com>
date Thu, 07 Dec 2023 11:14:01 -0500
parents 8548dc425697
children 71832ffe425a
comparison
equal deleted inserted replaced
194:8548dc425697 195:975a3f0965e2
121 rc/locale/es.ts 121 rc/locale/es.ts
122 ) 122 )
123 123
124 set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/rc/locale") 124 set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/rc/locale")
125 125
126 # dumb little hack to get this working on Qt5 and Qt6
127 if(UPDATE_TRANSLATIONS) 126 if(UPDATE_TRANSLATIONS)
128 cmake_language(CALL qt${QT_VERSION_MAJOR}_create_translation ${SRC_FILES} ${TS_FILES} OPTIONS "-I${CMAKE_CURRENT_SOURCE_DIR}/include") 127 cmake_language(CALL qt${QT_VERSION_MAJOR}_create_translation ${SRC_FILES} ${TS_FILES} OPTIONS "-I${CMAKE_CURRENT_SOURCE_DIR}/include")
129 endif() 128 endif()
130 cmake_language(CALL qt${QT_VERSION_MAJOR}_add_translation QM_FILES ${TS_FILES}) 129 cmake_language(CALL qt${QT_VERSION_MAJOR}_add_translation QM_FILES ${TS_FILES})
131 list(APPEND SRC_FILES ${QM_FILES}) 130 list(APPEND SRC_FILES ${QM_FILES})
194 target_include_directories(minori PUBLIC ${CURL_INCLUDE_DIRS} PRIVATE ${INCLUDE}) 193 target_include_directories(minori PUBLIC ${CURL_INCLUDE_DIRS} PRIVATE ${INCLUDE})
195 target_include_directories(minori PUBLIC ${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}) 194 target_include_directories(minori PUBLIC ${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS})
196 target_compile_options(minori PRIVATE -Wall -Wpedantic -Wextra -Wsuggest-override -Wold-style-cast) 195 target_compile_options(minori PRIVATE -Wall -Wpedantic -Wextra -Wsuggest-override -Wold-style-cast)
197 if(APPLE) 196 if(APPLE)
198 target_compile_definitions(minori PUBLIC MACOSX) 197 target_compile_definitions(minori PUBLIC MACOSX)
198 set_target_properties(minori PROPERTIES MACOSX_BUNDLE TRUE)
199 elseif(WIN32) 199 elseif(WIN32)
200 target_compile_definitions(minori PUBLIC WIN32) 200 target_compile_definitions(minori PUBLIC WIN32)
201 endif() 201 endif()
202 target_link_libraries(minori ${LIBRARIES}) 202 target_link_libraries(minori ${LIBRARIES})
203 203