X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=5330663dbf755100dfb99c42296e14a9681d8a43;hb=9a220973c4e4eaccdab85a5dc90d2ee893f8d247;hp=ff052ce1f439036ceaf32fe2e7eff91fb619938d;hpb=c3660d7d96b5861a0850a124de21f858adc8e09a;p=pulseview.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ff052ce1..5330663d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -429,7 +429,9 @@ qt5_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES}) file(GLOB TS_FILES ${CMAKE_SOURCE_DIR}/l10n/*.ts) set_property(SOURCE ${TS_FILES} PROPERTY OUTPUT_LOCATION ${CMAKE_BINARY_DIR}/l10n) -configure_file("translations.qrc" "translations.qrc" COPYONLY) +if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) + configure_file("translations.qrc" "translations.qrc" COPYONLY) +endif () qt5_add_translation(QM_FILES ${TS_FILES}) qt5_create_translation(QM_FILES ${pulseview_SOURCES} ${TS_FILES}) @@ -526,10 +528,11 @@ if(ANDROID) list(APPEND PULSEVIEW_LINK_LIBS "-llog") endif() +set(INPUT_FILES_LIST ${pulseview_SOURCES} ${pulseview_RESOURCES_RCC} ${QM_FILES}) if(ANDROID) - add_library(${PROJECT_NAME} SHARED ${pulseview_SOURCES} ${pulseview_RESOURCES_RCC} ${QM_FILES}) + add_library(${PROJECT_NAME} SHARED ${INPUT_FILES_LIST}) else() - add_executable(${PROJECT_NAME} ${pulseview_SOURCES} ${pulseview_RESOURCES_RCC} ${QM_FILES}) + add_executable(${PROJECT_NAME} ${INPUT_FILES_LIST}) endif() target_link_libraries(${PROJECT_NAME} ${PULSEVIEW_LINK_LIBS})