Remove checking the Platform and the App Type,

The check must be done, but not on the way I tried to do.

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

View file

@ -119,27 +119,25 @@ 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_PLATFORM MATCHES "Android")
set(FBSUPPORT OFF) # set(FBSUPPORT OFF)
set(NO_PRINTING ON) # set(NO_PRINTING ON)
list(APPEND QT_EXTRA_COMPONENTS AndroidExtras Quick) # list(APPEND QT_EXTRA_COMPONENTS AndroidExtras Quick)
list(APPEND QT_EXTRA_LIBRARIES Qt5::AndroidExtras Qt5::Quick) # list(APPEND QT_EXTRA_LIBRARIES Qt5::AndroidExtras Qt5::Quick)
set(SUBSURFACE_TARGET subsurface) # set(SUBSURFACE_TARGET subsurface)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -llog) # set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -llog)
add_definitions(-DSUBSURFACE_MOBILE) # add_definitions(-DSUBSURFACE_MOBILE)
elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "AndroidEmulator") # elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "AndroidEmulator")
elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "iOS")
elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "iOSEmulator") # set up the different target platforms
elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "Desktop") if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# set up the different target platforms
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(SUBSURFACE_TARGET subsurface) set(SUBSURFACE_TARGET subsurface)
# 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
# in some builds we appear to be missing libz for some strange reason... # in some builds we appear to be missing libz for some strange reason...
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lz -lpthread) set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lz -lpthread)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
execute_process( execute_process(
COMMAND sh scripts/get-version linux COMMAND sh scripts/get-version linux
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
@ -162,14 +160,14 @@ elseif(SUBSURFACE_TARGET_PLATFORM MATCHES "Desktop")
set(MACOSX_BUNDLE_COPYRIGHT "Linus Torvalds, Dirk Hohndel, Tomaz Canabrava, and others") set(MACOSX_BUNDLE_COPYRIGHT "Linus Torvalds, Dirk Hohndel, Tomaz Canabrava, and others")
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_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() 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)