summaryrefslogtreecommitdiffstats
path: root/libraries/ganalytics/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ganalytics/CMakeLists.txt')
-rw-r--r--libraries/ganalytics/CMakeLists.txt23
1 files changed, 20 insertions, 3 deletions
diff --git a/libraries/ganalytics/CMakeLists.txt b/libraries/ganalytics/CMakeLists.txt
index f6051d05..4b9a0cee 100644
--- a/libraries/ganalytics/CMakeLists.txt
+++ b/libraries/ganalytics/CMakeLists.txt
@@ -4,7 +4,24 @@ find_package(Qt5Core)
find_package(Qt5Gui)
find_package(Qt5Network)
-add_library(ganalytics STATIC ganalytics.cpp ganalytics.h)
+set(ganalytics_SOURCES
+src/ganalytics.cpp
+src/ganalytics_worker.cpp
+src/ganalytics_worker.h
+src/sys.h
+include/ganalytics.h
+)
+
+if (WIN32)
+ list(APPEND ganalytics_SOURCES src/sys_win32.cpp)
+elseif (UNIX)
+ if(APPLE)
+ list(APPEND ganalytics_SOURCES src/sys_apple.cpp)
+ else()
+ list(APPEND ganalytics_SOURCES src/sys_unix.cpp)
+ endif()
+endif()
+
+add_library(ganalytics STATIC ${ganalytics_SOURCES})
qt5_use_modules(ganalytics Core Gui Network)
-target_include_directories(ganalytics PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
-target_compile_definitions(ganalytics PRIVATE -DQT_GUI_LIB)
+target_include_directories(ganalytics PUBLIC include)