summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-11-23 12:19:38 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-16 08:00:57 -0800
commit320cfccd71d87a88ddb272096fd54d064c128508 (patch)
treed0420b79202e6fe740fd3a9f60e79bc41b9216fd /CMakeLists.txt
parent47a985b0c70ee4f60ad97c04d5099a0895721249 (diff)
downloadsubsurface-320cfccd71d87a88ddb272096fd54d064c128508.tar.gz
Change the way we handle targets
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e1b03fdd..27128888b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -115,12 +115,21 @@ include_directories(.
subsurface-core/
)
+# Project Target specific configuration should go here,
+# if the configuration is too big or would disrupt the normal code flux,
+# move it somewhere else (another file) and include it.
if(SUBSURFACE_TARGET_PLATFORM MATCHES "Android")
set(FBSUPPORT OFF)
set(NO_PRINTING ON)
list(APPEND QT_EXTRA_COMPONENTS AndroidExtras Quick)
list(APPEND QT_EXTRA_LIBRARIES Qt5::AndroidExtras Qt5::Quick)
+ set(SUBSURFACE_TARGET subsurface)
+ set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -llog)
add_definitions(-DSUBSURFACE_MOBILE)
+elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "AndroidEmulator")
+elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "iOS")
+elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "iOSEmulator")
+elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "Desktop")
endif()
if(BTSUPPORT)
@@ -152,11 +161,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# in some builds we appear to be missing libz for some strange reason...
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lz)
endif()
-if(ANDROID)
- set(SUBSURFACE_TARGET subsurface)
- # To allow us to debug log to logcat
- set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -llog)
-endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
execute_process(
COMMAND sh scripts/get-version linux