| 1 |
set(TARGET_NAME dtk-settings) |
| 2 |
set(BIN_NAME ${TARGET_NAME}${DTK_VERSION_MAJOR}) |
| 3 |
|
| 4 |
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core) |
| 5 |
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Xml) |
| 6 |
|
| 7 |
if(${QT_VERSION_MAJOR} STREQUAL "5") |
| 8 |
find_package(PkgConfig REQUIRED) |
| 9 |
pkg_check_modules(QGSettings REQUIRED IMPORTED_TARGET gsettings-qt) |
| 10 |
endif() |
| 11 |
|
| 12 |
add_executable(${BIN_NAME} |
| 13 |
main.cpp |
| 14 |
) |
| 15 |
target_link_libraries( |
| 16 |
${BIN_NAME} PRIVATE |
| 17 |
Qt${QT_VERSION_MAJOR}::Core |
| 18 |
Qt${QT_VERSION_MAJOR}::Xml |
| 19 |
${LIB_NAME} |
| 20 |
) |
| 21 |
|
| 22 |
if(${QT_VERSION_MAJOR} STREQUAL "5") |
| 23 |
target_link_libraries( |
| 24 |
${BIN_NAME} PRIVATE |
| 25 |
PkgConfig::QGSettings |
| 26 |
) |
| 27 |
endif() |
| 28 |
|
| 29 |
target_include_directories( ${BIN_NAME} PUBLIC |
| 30 |
../../include/util/ |
| 31 |
../../include/dci/ |
| 32 |
../../include/log/ |
| 33 |
../../include/base/ |
| 34 |
../../include/global/ |
| 35 |
../../include/DtkCore/ |
| 36 |
../../include/settings/ |
| 37 |
../../include/filesystem/ |
| 38 |
../../include/ |
| 39 |
) |
| 40 |
set_target_properties(${BIN_NAME} PROPERTIES OUTPUT_NAME ${TARGET_NAME}) |
| 41 |
install(TARGETS ${BIN_NAME} DESTINATION "${TOOL_INSTALL_DIR}") |