CMake: do not expand variables in if-expressions

CMake will do the expansion internally itself. Not doing it here is not only
less code, it also makes sure one does not accidentially get a double expansion.

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
This commit is contained in:
Rolf Eike Beer 2019-03-03 22:19:32 +01:00 committed by Dirk Hohndel
parent 69508d7123
commit 47e9a771ba
2 changed files with 27 additions and 29 deletions

View file

@ -35,11 +35,11 @@ set(SUBSURFACE_MOBILE_MODELS_LIB_SRCS
gpslistmodel.cpp
)
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
add_library(subsurface_models_desktop STATIC ${SUBSURFACE_GENERIC_MODELS_LIB_SRCS}
${SUBSURFACE_DESKTOP_MODELS_LIB_SRCS})
target_link_libraries(subsurface_models_desktop ${QT_LIBRARIES})
elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
add_library(subsurface_models_mobile STATIC ${SUBSURFACE_GENERIC_MODELS_LIB_SRCS}
${SUBSURFACE_MOBILE_MODELS_LIB_SRCS})
target_link_libraries(subsurface_models_mobile ${QT_LIBRARIES})