diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01c62073..8edde739 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,6 @@ if (COMMAND cmake_policy)
cmake_policy (SET CMP0005 NEW)
endif()
-
# Add headers to source list
if (${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
set (SYNERGY_ADD_HEADERS FALSE)
@@ -58,8 +57,8 @@ else()
set (SYNERGY_ADD_HEADERS TRUE)
endif()
-
set (libs)
+include_directories (BEFORE SYSTEM ./ext/gtest/include)
if (UNIX)
if (NOT APPLE)
@@ -291,34 +290,31 @@ endif()
#
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set (OPENSSL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/ext/openssl/windows)
-
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set (OPENSSL_ROOT "${OPENSSL_ROOT}/x64")
else()
set (OPENSSL_ROOT "${OPENSSL_ROOT}/x86")
endif()
+ include_directories (BEFORE SYSTEM ${OPENSSL_ROOT}/include)
set (OPENSSL_LIBS
${OPENSSL_ROOT}/lib/libeay32.lib
${OPENSSL_ROOT}/lib/ssleay32.lib
)
-
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set (OPENSSL_ROOT /usr/local/opt/openssl)
+ include_directories (BEFORE SYSTEM ${OPENSSL_ROOT}/include)
set (OPENSSL_LIBS
${OPENSSL_ROOT}/lib/libssl.a
${OPENSSL_ROOT}/lib/libcrypto.a
)
-
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (OPENSSL_LIBS ssl crypto)
else()
message (FATAL_ERROR "Couldn't find OpenSSL")
endif()
-set (OPENSSL_INCLUDE ${OPENSSL_ROOT}/include)
-
#
# Configure_file... but for directories, recursively.
#
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c6b75a1a..d6da3d8f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
+include_directories (./lib)
include_directories (${CMAKE_CURRENT_BINARY_DIR}/lib)
add_subdirectory(lib)
diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt
index 450c8417..9fbd7075 100644
--- a/src/cmd/CMakeLists.txt
+++ b/src/cmd/CMakeLists.txt
@@ -19,6 +19,6 @@ add_subdirectory(synergys)
add_subdirectory(syntool)
if (SYNERGY_BUILD_LEGACY_SERVICE)
- add_subdirectory(synergyd)
+ add_subdirectory(synergyd)
endif (SYNERGY_BUILD_LEGACY_SERVICE)
diff --git a/src/cmd/synergyc/CMakeLists.txt b/src/cmd/synergyc/CMakeLists.txt
index c3708163..f891eade 100644
--- a/src/cmd/synergyc/CMakeLists.txt
+++ b/src/cmd/synergyc/CMakeLists.txt
@@ -45,10 +45,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../../lib/
-)
-
add_executable(synergyc ${sources})
target_link_libraries(synergyc
arch base client common io mt net ipc platform server synlib ${libs} ${OPENSSL_LIBS})
diff --git a/src/cmd/synergyd/CMakeLists.txt b/src/cmd/synergyd/CMakeLists.txt
index 74b33ac2..59146252 100644
--- a/src/cmd/synergyd/CMakeLists.txt
+++ b/src/cmd/synergyd/CMakeLists.txt
@@ -17,10 +17,6 @@
file(GLOB headers "*.h")
file(GLOB sources "*.cpp")
-include_directories(
- ../../lib/
-)
-
if (WIN32)
add_executable (synergyd WIN32 ${sources})
else()
diff --git a/src/cmd/synergys/CMakeLists.txt b/src/cmd/synergys/CMakeLists.txt
index 75f1fcfe..de8181e3 100644
--- a/src/cmd/synergys/CMakeLists.txt
+++ b/src/cmd/synergys/CMakeLists.txt
@@ -45,10 +45,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../../lib/
-)
-
add_executable(synergys ${sources})
target_link_libraries(synergys
arch base client common io mt net ipc platform server synlib ${libs} ${OPENSSL_LIBS})
diff --git a/src/cmd/syntool/CMakeLists.txt b/src/cmd/syntool/CMakeLists.txt
index f717f16e..de3c910d 100644
--- a/src/cmd/syntool/CMakeLists.txt
+++ b/src/cmd/syntool/CMakeLists.txt
@@ -16,10 +16,6 @@
file(GLOB headers "*.h")
file(GLOB sources "*.cpp")
-include_directories(
- ../../lib/
-)
-
add_executable(syntool ${sources})
target_link_libraries(syntool
synlib arch base client common io ipc mt net platform server ${libs} ${OPENSSL_LIBS})
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index b74ff11a..176e42bc 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -10,7 +10,7 @@ file (GLOB LEGACY_GUI_SOURCE_FILES src/*.cpp src/*.h)
file (GLOB LEGACY_GUI_UI_FILES src/*.ui)
if (WIN32)
- set (LEGACY_GUI_RC_FILES res/win/Synergy.rc)
+ set (LEGACY_GUI_RC_FILES res/win/Synergy.rc)
endif()
add_executable (synergy WIN32
@@ -20,7 +20,7 @@ add_executable (synergy WIN32
res/Synergy.qrc
)
-include_directories (../lib/shared ./src)
+include_directories (./src)
target_link_libraries (synergy shared)
if (WIN32)
@@ -37,7 +37,7 @@ target_compile_definitions (synergy PRIVATE -DVERSION_STAGE="${VERSION_STAGE}")
target_compile_definitions (synergy PRIVATE -DVERSION_REVISION="${SYNERGY_GIT_COMMIT}")
if (WIN32)
- target_link_libraries (synergy ${DNSSD_LIB})
+ target_link_libraries (synergy ${DNSSD_LIB})
set_target_properties (synergy PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
endif()
diff --git a/src/gui/src/ActivationDialog.cpp b/src/gui/src/ActivationDialog.cpp
index 1956ccb0..eb6593b5 100644
--- a/src/gui/src/ActivationDialog.cpp
+++ b/src/gui/src/ActivationDialog.cpp
@@ -3,7 +3,7 @@
#include "CancelActivationDialog.h"
#include "AppConfig.h"
#include "WebClient.h"
-#include "EditionType.h"
+#include
#include "ActivationNotifier.h"
#include "MainWindow.h"
#include "QUtility.h"
diff --git a/src/gui/src/AppConfig.cpp b/src/gui/src/AppConfig.cpp
index 84e2e3d9..3fac02a9 100644
--- a/src/gui/src/AppConfig.cpp
+++ b/src/gui/src/AppConfig.cpp
@@ -17,7 +17,6 @@
*/
#include "AppConfig.h"
-#include "EditionType.h"
#include "QUtility.h"
#include
diff --git a/src/gui/src/AppConfig.h b/src/gui/src/AppConfig.h
index 1c9d6d53..fb4b37ed 100644
--- a/src/gui/src/AppConfig.h
+++ b/src/gui/src/AppConfig.h
@@ -23,7 +23,7 @@
#include
#include
#include "ElevateMode.h"
-#include
+#include
// this should be incremented each time a new page is added. this is
// saved to settings when the user finishes running the wizard. if
diff --git a/src/gui/src/LicenseManager.cpp b/src/gui/src/LicenseManager.cpp
index 6f761135..b608ae6c 100644
--- a/src/gui/src/LicenseManager.cpp
+++ b/src/gui/src/LicenseManager.cpp
@@ -16,7 +16,6 @@
*/
#include "LicenseManager.h"
-#include "EditionType.h"
#include "AppConfig.h"
#include
#include
diff --git a/src/gui/src/LicenseManager.h b/src/gui/src/LicenseManager.h
index d5c77b16..88fdbb59 100644
--- a/src/gui/src/LicenseManager.h
+++ b/src/gui/src/LicenseManager.h
@@ -18,7 +18,8 @@
#pragma once
#include
-#include
+#include
+#include
#include
#include
diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp
index 797f43dc..56146367 100644
--- a/src/gui/src/MainWindow.cpp
+++ b/src/gui/src/MainWindow.cpp
@@ -31,7 +31,7 @@
#include "DataDownloader.h"
#include "CommandProcess.h"
#include "LicenseManager.h"
-#include "EditionType.h"
+#include
#include "QUtility.h"
#include "ProcessorArch.h"
#include "SslCertificate.h"
diff --git a/src/gui/src/QUtility.cpp b/src/gui/src/QUtility.cpp
index 87cfceee..34c0db96 100644
--- a/src/gui/src/QUtility.cpp
+++ b/src/gui/src/QUtility.cpp
@@ -19,7 +19,6 @@
#include "ProcessorArch.h"
#include "CommandProcess.h"
-#include "EditionType.h"
#if defined(Q_OS_LINUX)
#include
diff --git a/src/gui/src/SettingsDialog.cpp b/src/gui/src/SettingsDialog.cpp
index 9ed7a0d3..109d2d06 100644
--- a/src/gui/src/SettingsDialog.cpp
+++ b/src/gui/src/SettingsDialog.cpp
@@ -23,7 +23,6 @@
#include "QSynergyApplication.h"
#include "QUtility.h"
#include "AppConfig.h"
-#include "EditionType.h"
#include "SslCertificate.h"
#include "MainWindow.h"
diff --git a/src/gui/src/SetupWizard.cpp b/src/gui/src/SetupWizard.cpp
index 5ee02108..c7af2547 100644
--- a/src/gui/src/SetupWizard.cpp
+++ b/src/gui/src/SetupWizard.cpp
@@ -20,7 +20,6 @@
#include "WebClient.h"
#include "ActivationNotifier.h"
#include "LicenseManager.h"
-#include "EditionType.h"
#include "QSynergyApplication.h"
#include "QUtility.h"
diff --git a/src/gui/src/WebClient.cpp b/src/gui/src/WebClient.cpp
index c8e5a4a8..99ad1a13 100644
--- a/src/gui/src/WebClient.cpp
+++ b/src/gui/src/WebClient.cpp
@@ -17,7 +17,6 @@
#include "WebClient.h"
-#include "EditionType.h"
#include "QUtility.h"
#include
diff --git a/src/lib/arch/CMakeLists.txt b/src/lib/arch/CMakeLists.txt
index a0cf547a..e7b755be 100644
--- a/src/lib/arch/CMakeLists.txt
+++ b/src/lib/arch/CMakeLists.txt
@@ -37,10 +37,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
-)
-
add_library(arch STATIC ${sources})
if (UNIX)
diff --git a/src/lib/base/CMakeLists.txt b/src/lib/base/CMakeLists.txt
index 742fa314..30d0e932 100644
--- a/src/lib/base/CMakeLists.txt
+++ b/src/lib/base/CMakeLists.txt
@@ -21,10 +21,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
-)
-
add_library(base STATIC ${sources})
if (UNIX)
diff --git a/src/lib/client/CMakeLists.txt b/src/lib/client/CMakeLists.txt
index 8aa6150e..3e8dc7fc 100644
--- a/src/lib/client/CMakeLists.txt
+++ b/src/lib/client/CMakeLists.txt
@@ -21,11 +21,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
- ../../../ext
-)
-
add_library(client STATIC ${sources})
if (UNIX)
diff --git a/src/lib/common/CMakeLists.txt b/src/lib/common/CMakeLists.txt
index c4a04be5..e068ac20 100644
--- a/src/lib/common/CMakeLists.txt
+++ b/src/lib/common/CMakeLists.txt
@@ -21,8 +21,4 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
-)
-
add_library(common STATIC ${sources})
diff --git a/src/lib/io/CMakeLists.txt b/src/lib/io/CMakeLists.txt
index 4eb462f9..e8c55f79 100644
--- a/src/lib/io/CMakeLists.txt
+++ b/src/lib/io/CMakeLists.txt
@@ -21,8 +21,4 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
-)
-
add_library(io STATIC ${sources})
diff --git a/src/lib/ipc/CMakeLists.txt b/src/lib/ipc/CMakeLists.txt
index bc68321b..8615a50d 100644
--- a/src/lib/ipc/CMakeLists.txt
+++ b/src/lib/ipc/CMakeLists.txt
@@ -21,10 +21,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
-)
-
add_library(ipc STATIC ${sources})
if (UNIX)
diff --git a/src/lib/mt/CMakeLists.txt b/src/lib/mt/CMakeLists.txt
index 6da313d1..de72b480 100644
--- a/src/lib/mt/CMakeLists.txt
+++ b/src/lib/mt/CMakeLists.txt
@@ -21,8 +21,4 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
-)
-
add_library(mt STATIC ${sources})
diff --git a/src/lib/net/CMakeLists.txt b/src/lib/net/CMakeLists.txt
index 4ec686cc..62e0231a 100644
--- a/src/lib/net/CMakeLists.txt
+++ b/src/lib/net/CMakeLists.txt
@@ -21,11 +21,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
- ${OPENSSL_INCLUDE}
-)
-
add_library(net STATIC ${sources})
if (UNIX)
diff --git a/src/lib/platform/CMakeLists.txt b/src/lib/platform/CMakeLists.txt
index e183fba1..af36c55f 100644
--- a/src/lib/platform/CMakeLists.txt
+++ b/src/lib/platform/CMakeLists.txt
@@ -29,11 +29,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
- ../../../ext/gtest/include
-)
-
if (APPLE)
list(APPEND inc
/System/Library/Frameworks
diff --git a/src/lib/server/CMakeLists.txt b/src/lib/server/CMakeLists.txt
index b7bd6b26..1fc7154d 100644
--- a/src/lib/server/CMakeLists.txt
+++ b/src/lib/server/CMakeLists.txt
@@ -21,12 +21,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
- ../../../ext
- ../../../ext/gtest/include
-)
-
add_library(server STATIC ${sources})
target_link_libraries(server shared)
diff --git a/src/lib/shared/CMakeLists.txt b/src/lib/shared/CMakeLists.txt
index 58faaf3e..f518c460 100644
--- a/src/lib/shared/CMakeLists.txt
+++ b/src/lib/shared/CMakeLists.txt
@@ -22,11 +22,5 @@ endif()
add_library(shared STATIC ${sources})
-include_directories(
- ../
- ../../../ext
- ../../../ext/gtest/include
-)
-
target_link_libraries(shared arch base)
diff --git a/src/lib/shared/SerialKey.h b/src/lib/shared/SerialKey.h
index fa031661..a27382cc 100644
--- a/src/lib/shared/SerialKey.h
+++ b/src/lib/shared/SerialKey.h
@@ -22,7 +22,7 @@
#include "EditionType.h"
#ifdef TEST_ENV
-#include "gtest/gtest_prod.h"
+#include
#endif
class SerialKey {
diff --git a/src/lib/synergy/CMakeLists.txt b/src/lib/synergy/CMakeLists.txt
index 52615ee6..91008696 100644
--- a/src/lib/synergy/CMakeLists.txt
+++ b/src/lib/synergy/CMakeLists.txt
@@ -33,12 +33,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
- ../../../ext
- ../../../ext/gtest/include
-)
-
add_library(synlib STATIC ${sources})
if (UNIX)
diff --git a/src/lib/synergy/KeyMap.h b/src/lib/synergy/KeyMap.h
index 8de5e2b5..8ed82ebc 100644
--- a/src/lib/synergy/KeyMap.h
+++ b/src/lib/synergy/KeyMap.h
@@ -24,7 +24,7 @@
#include "common/stdset.h"
#include "common/stdvector.h"
-#include "gtest/gtest_prod.h"
+#include
namespace synergy {
diff --git a/src/lib/synwinhk/CMakeLists.txt b/src/lib/synwinhk/CMakeLists.txt
index 98b709f5..c9f68baa 100644
--- a/src/lib/synwinhk/CMakeLists.txt
+++ b/src/lib/synwinhk/CMakeLists.txt
@@ -20,10 +20,6 @@ if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
-include_directories(
- ../
-)
-
add_library(synwinhk SHARED ${sources})
if (NOT MSVC_VERSION VERSION_LESS 1900)