From ddf4f8cb9c2c3caa668915b222cccca6bd5e0094 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Tue, 18 Sep 2018 17:11:01 +0200 Subject: Update vendor.cmake - add some more comments - made plugin include paths more generic --- src/CMakeLists.txt | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5db6e36..df2aeeb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,14 +6,16 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) -set(poi_SRC +set(srclist # main main.cpp browser.cpp browser.h session.cpp session.h - ../data/resources.qrc + + # resources (icons, etc) + ${PROJECT_SOURCE_DIR}/data/resources.qrc # main window mainwindow/mainwindow.cpp @@ -46,19 +48,19 @@ set(poi_SRC ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - add_executable(${poi_NAME} WIN32 ${poi_SRC} ../data/windows.rc) + add_executable(${poi_exe} WIN32 ${srclist} ${PROJECT_SOURCE_DIR}/data/windows.rc) else() - add_executable(${poi_NAME} ${poi_SRC}) + add_executable(${poi_exe} ${srclist}) endif() -target_include_directories(${poi_NAME} +target_include_directories(${poi_exe} PRIVATE ${Boost_INCLUDE_DIRS} - PRIVATE ../3rd-party - PRIVATE ../lib ../plugins - PRIVATE ../lib/configuration - PRIVATE ../lib/web) + PRIVATE ${PROJECT_SOURCE_DIR}/3rd-party + PRIVATE ${PROJECT_SOURCE_DIR}/lib + PRIVATE ${PROJECT_SOURCE_DIR}/plugins +) -target_link_libraries(${poi_NAME} +target_link_libraries(${poi_exe} Qt5::Core Qt5::Widgets Qt5::Concurrent Qt5::WebEngineWidgets ${Boost_LIBRARIES} SingleApplication @@ -69,16 +71,17 @@ target_link_libraries(${poi_NAME} ) if(Plasma) - target_link_libraries(${poi_NAME} KF5::WindowSystem) - target_compile_definitions(${poi_NAME} + target_link_libraries(${poi_exe} KF5::WindowSystem) + target_compile_definitions(${poi_exe} PRIVATE PLASMA_BLUR # give the main window a translucent background and blur ) endif(Plasma) -target_compile_definitions(${poi_NAME} +target_compile_definitions(${poi_exe} PRIVATE QAPPLICATION_CLASS=QApplication + PRIVATE POI_NAME=\"${poi_name}\" PRIVATE QTBUG_65223_WORKAROUND #PRIVATE QTBUG_68224_WORKAROUND ) -install(TARGETS ${poi_NAME} RUNTIME DESTINATION ${BINARY_DESTINATION} CONFIGURATIONS Release) +install(TARGETS ${poi_exe} RUNTIME DESTINATION ${installPath_bin} CONFIGURATIONS Release) -- cgit v1.2.1