Create targets MobileApplication and DesktopApplication

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
This commit is contained in:
Tomaz Canabrava 2015-12-16 14:50:41 -02:00 committed by Dirk Hohndel
parent 89658cc291
commit 27bf6f68f6

View file

@ -119,19 +119,22 @@ include_directories(.
# Project Target specific configuration should go here, # Project Target specific configuration should go here,
# if the configuration is too big or would disrupt the normal code flux, # if the configuration is too big or would disrupt the normal code flux,
# move it somewhere else (another file) and include it. # move it somewhere else (another file) and include it.
# if(SUBSURFACE_TARGET_PLATFORM MATCHES "Android") if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopApplication")
# set(FBSUPPORT OFF) set(SUBSURFACE_TARGET subsurface)
# set(NO_PRINTING ON) elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopApplication")
# list(APPEND QT_EXTRA_COMPONENTS AndroidExtras Quick) set(SUBSURFACE_TARGET subsurface-mobile)
# list(APPEND QT_EXTRA_LIBRARIES Qt5::AndroidExtras Qt5::Quick) list(APPEND QT_EXTRA_COMPONENTS QtQuick)
# set(SUBSURFACE_TARGET subsurface) list(APPEND QT_EXTRA_LIBRARIES Qt5::QtQuick)
# set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -llog) add_definitions(-DSUBSURFACE_MOBILE)
# add_definitions(-DSUBSURFACE_MOBILE) endif()
# elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "AndroidEmulator")
# set up the different target platforms if(ANDROID)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(FBSUPPORT OFF)
set(SUBSURFACE_TARGET subsurface) set(NO_PRINTING ON)
list(APPEND QT_EXTRA_COMPONENTS AndroidExtras)
list(APPEND QT_EXTRA_LIBRARIES Qt5::AndroidExtras)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -llog)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# add pthread to the end of the library list on Linux # add pthread to the end of the library list on Linux
# this is only needed on Ubuntu # this is only needed on Ubuntu
# but shouldn't hurt on other Linux versions # but shouldn't hurt on other Linux versions
@ -144,7 +147,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
OUTPUT_VARIABLE SSRF_VERSION_STRING OUTPUT_VARIABLE SSRF_VERSION_STRING
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
set(SUBSURFACE_TARGET Subsurface)
find_library(APP_SERVICES_LIBRARY ApplicationServices) find_library(APP_SERVICES_LIBRARY ApplicationServices)
find_library(HID_LIB HidApi) find_library(HID_LIB HidApi)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${HID_LIB}) set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${HID_LIB})
@ -161,13 +163,11 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
set(SUBSURFACE_PKG MACOSX_BUNDLE ${ICON_FILE}) set(SUBSURFACE_PKG MACOSX_BUNDLE ${ICON_FILE})
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(SUBSURFACE_TARGET subsurface)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lwsock32 -lws2_32) set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lwsock32 -lws2_32)
remove_definitions(-DUNICODE) remove_definitions(-DUNICODE)
add_definitions(-mwindows -D_WIN32) add_definitions(-mwindows -D_WIN32)
endif() endif()
if(BTSUPPORT) if(BTSUPPORT)
list(APPEND QT_EXTRA_COMPONENTS Bluetooth) list(APPEND QT_EXTRA_COMPONENTS Bluetooth)
list(APPEND QT_EXTRA_LIBRARIES Qt5::Bluetooth) list(APPEND QT_EXTRA_LIBRARIES Qt5::Bluetooth)