diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fbb515dc..96b6067ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,7 +216,7 @@ if(UNIX) endif() endif() -include_directories(SYSTEM ${GCRYPT_INCLUDE_DIR} ${MHD_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) +include_directories(SYSTEM ${GCRYPT_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) include(FeatureSummary) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bfaf8e25d..e12873fa2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -149,8 +149,8 @@ set(keepassx_FORMS add_feature_info(KeePassHTTP WITH_XC_HTTP "KeePassHTTP support for ChromeIPass and PassIFox") add_feature_info(Autotype WITH_XC_AUTOTYPE "Auto-type passwords in Input fields") +add_subdirectory(http) if(WITH_XC_HTTP) - add_subdirectory(http) set(keepasshttp_LIB keepasshttp) endif() @@ -186,20 +186,13 @@ target_link_libraries(autotype Qt5::Core Qt5::Widgets) set(autotype_LIB autotype) add_library(keepassx_core STATIC ${keepassx_SOURCES}) -set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE) -target_link_libraries(keepassx_core zxcvbn ${keepasshttp_LIB} ${autotype_LIB} - Qt5::Core - Qt5::Concurrent - Qt5::Widgets - Qt5::Network) -if (UNIX AND NOT APPLE) - target_link_libraries(keepassx_core Qt5::DBus) -endif() -add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE}) -target_link_libraries(${PROGNAME} - keepassx_core +set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE) +target_link_libraries(keepassx_core + ${keepasshttp_LIB} + ${autotype_LIB} zxcvbn + qhttp Qt5::Core Qt5::Concurrent Qt5::Widgets @@ -207,7 +200,12 @@ target_link_libraries(${PROGNAME} ${GCRYPT_LIBRARIES} ${GPGERROR_LIBRARIES} ${ZLIB_LIBRARIES}) +if (UNIX AND NOT APPLE) + target_link_libraries(keepassx_core Qt5::DBus) +endif() +add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE}) +target_link_libraries(${PROGNAME} keepassx_core) set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON) diff --git a/src/http/CMakeLists.txt b/src/http/CMakeLists.txt index c044dd0f2..53fe7e176 100644 --- a/src/http/CMakeLists.txt +++ b/src/http/CMakeLists.txt @@ -1,24 +1,26 @@ -project(keepasshttp) - -set(keepasshttp_SOURCES - AccessControlDialog.cpp - EntryConfig.cpp - HttpPasswordGeneratorWidget.cpp - HttpSettings.cpp - OptionDialog.cpp - Protocol.cpp - Server.cpp - Service.cpp -) -set(keepasshttp_FORMS - AccessControlDialog.ui - HttpPasswordGeneratorWidget.ui - OptionDialog.ui -) - -qt5_wrap_ui(keepasshttp_SOURCES ${keepasshttp_FORMS}) - add_subdirectory(qhttp) -add_library(keepasshttp STATIC ${keepasshttp_SOURCES}) -target_link_libraries(keepasshttp qhttp Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network) \ No newline at end of file +if(WITH_XC_HTTP) + include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + + set(keepasshttp_SOURCES + AccessControlDialog.cpp + EntryConfig.cpp + HttpPasswordGeneratorWidget.cpp + HttpSettings.cpp + OptionDialog.cpp + Protocol.cpp + Server.cpp + Service.cpp + ) + set(keepasshttp_FORMS + AccessControlDialog.ui + HttpPasswordGeneratorWidget.ui + OptionDialog.ui + ) + + qt5_wrap_ui(keepasshttp_SOURCES ${keepasshttp_FORMS}) + + add_library(keepasshttp STATIC ${keepasshttp_SOURCES}) + target_link_libraries(keepasshttp qhttp Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network) +endif()