Cmake: consistently use SUBSURFACE_TARGET and get the capitalization right

Also clean up a bit of the whitespace mess right where I'm making changes

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-12-17 11:08:21 -08:00
parent d0b526eda4
commit 7c095419f7

View file

@ -120,12 +120,20 @@ include_directories(.
# 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_EXECUTABLE} MATCHES "DesktopExecutable") if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
set(SUBSURFACE_TARGET subsurface) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(SUBSURFACE_TARGET Subsurface)
else()
set(SUBSURFACE_TARGET subsurface)
endif()
elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable") elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
set(SUBSURFACE_TARGET subsurface-mobile) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
list(APPEND QT_EXTRA_COMPONENTS Quick) set(SUBSURFACE_TARGET Subsurface-mobile)
list(APPEND QT_EXTRA_LIBRARIES Qt5::Quick) else()
add_definitions(-DSUBSURFACE_MOBILE) set(SUBSURFACE_TARGET subsurface-mobile)
endif()
list(APPEND QT_EXTRA_COMPONENTS Quick)
list(APPEND QT_EXTRA_LIBRARIES Qt5::Quick)
add_definitions(-DSUBSURFACE_MOBILE)
endif() endif()
if(ANDROID) if(ANDROID)
@ -209,7 +217,6 @@ endif()
# create the executables # create the executables
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable") if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
set(SUBSURFACE_TARGET subsurface-mobile)
set(MOBILE_SRC set(MOBILE_SRC
qt-mobile/qmlmanager.cpp qt-mobile/qmlmanager.cpp
qt-mobile/qmlprofile.cpp qt-mobile/qmlprofile.cpp
@ -411,7 +418,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
install(DIRECTORY printing_templates DESTINATION share/subsurface) install(DIRECTORY printing_templates DESTINATION share/subsurface)
install(FILES ${TRANSLATIONS} DESTINATION share/subsurface/translations) install(FILES ${TRANSLATIONS} DESTINATION share/subsurface/translations)
if(SUBSURFACE_MOBILE) if(SUBSURFACE_MOBILE)
install(TARGETS subsurface-mobile DESTINATION bin) install(TARGETS ${SUBSURFACE_TARGET} DESTINATION bin)
else() else()
install(TARGETS ${SUBSURFACE_TARGET} DESTINATION bin) install(TARGETS ${SUBSURFACE_TARGET} DESTINATION bin)
if (SMARTTRAK_IMPORT) if (SMARTTRAK_IMPORT)