Warning, /utilities/isoimagewriter/isoimagewriter/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 set(GPGME_REQUIRED_VERSION "1.8.0")
0002 find_package(Gpgmepp ${GPGME_REQUIRED_VERSION} CONFIG)
0003 find_package(QGpgme ${GPGME_REQUIRED_VERSION} CONFIG)
0004 
0005 #find_package(KF5 REQUIRED COMPONENTS QGpgme)
0006 
0007 ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX ISOIMAGEWRITER VERSION_HEADER isoimagewriter_version.h)
0008 
0009 set(isoimagewriter_SRCS
0010     usbdevicemonitor.h
0011     common.cpp
0012     mainapplication.cpp
0013     mainwindow.cpp
0014     imagewriter.cpp
0015     physicaldevice.cpp
0016     main.cpp
0017     isoverifier.cpp
0018     fetchisojob.cpp
0019 )
0020 
0021 ecm_qt_declare_logging_category(isoimagewriter_SRCS
0022                                 HEADER isoimagewriter_debug.h
0023                                 IDENTIFIER ISOIMAGEWRITER_LOG
0024                                 CATEGORY_NAME org.kde.isoimagewriter
0025                                 DEFAULT_SEVERITY Debug)
0026 
0027 if(CMAKE_SYSTEM_NAME STREQUAL Windows)
0028     message("Compiling isoimagewriter for Windows")
0029     set(CMAKE_EXE_LINKER_FLAGS    "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
0030     set(isoimagewriter_SRCS
0031         ${isoimagewriter_SRCS}
0032         platform_win.cpp
0033         usbdevicemonitor_win.cpp
0034         externalprogressbar_win.cpp
0035         isoimagewriter.rc
0036     )
0037 elseif(CMAKE_SYSTEM_NAME STREQUAL Linux)
0038     message("Compiling isoimagewriter for Linux")
0039     set(isoimagewriter_SRCS
0040         ${isoimagewriter_SRCS}
0041         platform_lin.cpp
0042         usbdevicemonitor_lin.cpp
0043         externalprogressbar_lin.cpp
0044     )
0045 elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
0046     message("Compiling isoimagewriter for FreeBSD")
0047     set(isoimagewriter_SRCS
0048         ${isoimagewriter_SRCS}
0049         platform_lin.cpp
0050         usbdevicemonitor_lin.cpp
0051         externalprogressbar_lin.cpp
0052     )
0053 else()
0054     message("Unsupported Platform " . ${CMAKE_SYSTEM_NAME})
0055 endif()
0056 
0057 add_executable(isoimagewriter ${isoimagewriter_SRCS})
0058 
0059 if (ROSA_BRANDING)
0060     target_compile_definitions(isoimagewriter PRIVATE -DROSA_BRANDING="1")
0061 endif (ROSA_BRANDING)
0062 target_compile_definitions(isoimagewriter PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
0063 
0064 target_link_libraries(isoimagewriter
0065     Qt::Widgets
0066     Qt::Network
0067     KF5::I18n
0068     KF5::CoreAddons
0069     KF5::WidgetsAddons
0070     KF5::IconThemes
0071     KF5::Crash
0072     KF5::Archive
0073     KF5::Solid
0074 )
0075 if(QGpgme_FOUND)
0076 add_definitions(-D_USE_GPG)
0077 target_link_libraries(isoimagewriter
0078     QGpgme
0079 )
0080 endif()
0081 
0082 if(CMAKE_SYSTEM_NAME STREQUAL Linux)
0083   target_link_libraries(isoimagewriter KF5::Solid)
0084 endif()
0085 
0086 if(USE_KAUTH)
0087   target_link_libraries(isoimagewriter KF5::AuthCore)
0088 endif()
0089 
0090 install(TARGETS isoimagewriter ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0091 if(CMAKE_SYSTEM_NAME STREQUAL Linux)
0092     install(PROGRAMS org.kde.isoimagewriter.desktop  DESTINATION ${KDE_INSTALL_APPDIR})
0093     install(FILES org.kde.isoimagewriter.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0094 endif()
0095 
0096 # KAuth
0097 if(USE_KAUTH)
0098     add_executable(isoimagewriter_helper common.cpp imagewriter_helper.cpp imagewriter.cpp physicaldevice.cpp)
0099     target_link_libraries(isoimagewriter_helper Qt::Widgets KF5::AuthCore KF5::I18n KF5::WidgetsAddons KF5::Archive)
0100     install(TARGETS isoimagewriter_helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
0101     kauth_install_helper_files(isoimagewriter_helper org.kde.isoimagewriter root)
0102     kauth_install_actions(org.kde.isoimagewriter isoimagewriter.actions)
0103 endif()