Cmake: indentation fix

I split this out as separate commit so that the previous commit becomes easier
to read.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-12-16 14:27:27 -08:00
parent 060b5e2189
commit 5672d3f567

View file

@ -319,90 +319,90 @@ if(ANDROID)
PACKAGE_SOURCES ${CMAKE_CURRENT_LIST_DIR}/android-mobile PACKAGE_SOURCES ${CMAKE_CURRENT_LIST_DIR}/android-mobile
) )
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(RESOURCEDIR ${CMAKE_BINARY_DIR}/Subsurface.app/Contents/Resources) set(RESOURCEDIR ${CMAKE_BINARY_DIR}/Subsurface.app/Contents/Resources)
set(PLUGINDIR ${CMAKE_BINARY_DIR}/Subsurface.app/Contents/PlugIns) set(PLUGINDIR ${CMAKE_BINARY_DIR}/Subsurface.app/Contents/PlugIns)
install(DIRECTORY marbledata/maps DESTINATION ${RESOURCEDIR}/data) install(DIRECTORY marbledata/maps DESTINATION ${RESOURCEDIR}/data)
install(DIRECTORY marbledata/bitmaps DESTINATION ${RESOURCEDIR}/data) install(DIRECTORY marbledata/bitmaps DESTINATION ${RESOURCEDIR}/data)
install(DIRECTORY Documentation/images DESTINATION ${RESOURCEDIR}/share/Documentation) install(DIRECTORY Documentation/images DESTINATION ${RESOURCEDIR}/share/Documentation)
install(FILES ${DOCFILES} DESTINATION ${RESOURCEDIR}/share/Documentation) install(FILES ${DOCFILES} DESTINATION ${RESOURCEDIR}/share/Documentation)
install(DIRECTORY theme DESTINATION ${RESOURCEDIR}) install(DIRECTORY theme DESTINATION ${RESOURCEDIR})
install(DIRECTORY printing_templates DESTINATION ${RESOURCEDIR}) install(DIRECTORY printing_templates DESTINATION ${RESOURCEDIR})
install(FILES ${TRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations) install(FILES ${TRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations)
install(FILES ${QTTRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations) install(FILES ${QTTRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations)
install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt DESTINATION ${RESOURCEDIR}) install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt DESTINATION ${RESOURCEDIR})
# this is a HACK # this is a HACK
install(DIRECTORY ${Grantlee5_DIR}/../../grantlee DESTINATION ${PLUGINDIR}) install(DIRECTORY ${Grantlee5_DIR}/../../grantlee DESTINATION ${PLUGINDIR})
# this is a hack - but I don't know how else to find the macdeployqt program if it's not in the PATH # this is a hack - but I don't know how else to find the macdeployqt program if it's not in the PATH
string(REPLACE moc macdeployqt MACDEPLOYQT ${QT_MOC_EXECUTABLE}) string(REPLACE moc macdeployqt MACDEPLOYQT ${QT_MOC_EXECUTABLE})
install(CODE "execute_process(COMMAND ${MACDEPLOYQT} Subsurface.app)") install(CODE "execute_process(COMMAND ${MACDEPLOYQT} Subsurface.app)")
install(CODE "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")") install(CODE "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
# Windows bundling rules # Windows bundling rules
# We don't have a helpful tool like macdeployqt for Windows, so we hardcode # We don't have a helpful tool like macdeployqt for Windows, so we hardcode
# which libs we need. # which libs we need.
# "make install", copies everything into a staging area # "make install", copies everything into a staging area
# "make installer", uses makensis to create an installer executable # "make installer", uses makensis to create an installer executable
set(WINDOWSSTAGING ${CMAKE_BINARY_DIR}/staging) set(WINDOWSSTAGING ${CMAKE_BINARY_DIR}/staging)
install(DIRECTORY marbledata/maps DESTINATION ${WINDOWSSTAGING}/data) install(DIRECTORY marbledata/maps DESTINATION ${WINDOWSSTAGING}/data)
install(DIRECTORY marbledata/bitmaps DESTINATION ${WINDOWSSTAGING}/data) install(DIRECTORY marbledata/bitmaps DESTINATION ${WINDOWSSTAGING}/data)
install(DIRECTORY Documentation/images DESTINATION ${WINDOWSSTAGING}/Documentation) install(DIRECTORY Documentation/images DESTINATION ${WINDOWSSTAGING}/Documentation)
install(FILES ${DOCFILES} DESTINATION ${WINDOWSSTAGING}/Documentation) install(FILES ${DOCFILES} DESTINATION ${WINDOWSSTAGING}/Documentation)
install(DIRECTORY theme DESTINATION ${WINDOWSSTAGING}) install(DIRECTORY theme DESTINATION ${WINDOWSSTAGING})
install(DIRECTORY printing_templates DESTINATION ${WINDOWSSTAGING}) install(DIRECTORY printing_templates DESTINATION ${WINDOWSSTAGING})
install(FILES ${TRANSLATIONS} DESTINATION ${WINDOWSSTAGING}/translations) install(FILES ${TRANSLATIONS} DESTINATION ${WINDOWSSTAGING}/translations)
install(FILES ${QTTRANSLATIONS} DESTINATION ${WINDOWSSTAGING}/translations) install(FILES ${QTTRANSLATIONS} DESTINATION ${WINDOWSSTAGING}/translations)
install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt ${CMAKE_SOURCE_DIR}/packaging/windows/subsurface.ico DESTINATION ${WINDOWSSTAGING}) install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt ${CMAKE_SOURCE_DIR}/packaging/windows/subsurface.ico DESTINATION ${WINDOWSSTAGING})
install(TARGETS ${SUBSURFACE_TARGET} DESTINATION ${WINDOWSSTAGING}) install(TARGETS ${SUBSURFACE_TARGET} DESTINATION ${WINDOWSSTAGING})
install(FILES ${CMAKE_BINARY_DIR}/qt.conf DESTINATION ${WINDOWSSTAGING}) install(FILES ${CMAKE_BINARY_DIR}/qt.conf DESTINATION ${WINDOWSSTAGING})
install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/grantlee DESTINATION ${WINDOWSSTAGING}) install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/grantlee DESTINATION ${WINDOWSSTAGING})
if(NOT DEFINED MAKENSIS) if(NOT DEFINED MAKENSIS)
set(MAKENSIS makensis) set(MAKENSIS makensis)
endif() endif()
# the script we created above is now added as a command to run at # the script we created above is now added as a command to run at
# install time - so this ensures that subsurface.exe has been # install time - so this ensures that subsurface.exe has been
# built before this is run # built before this is run
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -DSTAGING=${WINDOWSSTAGING} -P cmake/Modules/dlllist.cmake)") install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -DSTAGING=${WINDOWSSTAGING} -P cmake/Modules/dlllist.cmake)")
# create the subsurface-x.y.z.exe installer - this needs to depend # create the subsurface-x.y.z.exe installer - this needs to depend
# on the install target but cmake doesn't allow that, so we depend # on the install target but cmake doesn't allow that, so we depend
# on the fake target instead # on the fake target instead
add_custom_target( add_custom_target(
fake_install fake_install
COMMAND "${CMAKE_COMMAND}" --build . --target install COMMAND "${CMAKE_COMMAND}" --build . --target install
DEPENDS ${SUBSURFACE_TARGET} DEPENDS ${SUBSURFACE_TARGET}
) )
add_custom_target( add_custom_target(
installer installer
COMMAND ${MAKENSIS} ${WINDOWSSTAGING}/subsurface.nsi COMMAND ${MAKENSIS} ${WINDOWSSTAGING}/subsurface.nsi
DEPENDS fake_install DEPENDS fake_install
) )
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
install(DIRECTORY marbledata/maps DESTINATION share/subsurface/data) install(DIRECTORY marbledata/maps DESTINATION share/subsurface/data)
install(DIRECTORY marbledata/bitmaps DESTINATION share/subsurface/data) install(DIRECTORY marbledata/bitmaps DESTINATION share/subsurface/data)
install(FILES subsurface.debug DESTINATION bin) install(FILES subsurface.debug DESTINATION bin)
install(FILES subsurface.desktop DESTINATION share/applications) install(FILES subsurface.desktop DESTINATION share/applications)
install(FILES icons/subsurface-icon.svg DESTINATION share/icons/hicolor/scalable/apps) install(FILES icons/subsurface-icon.svg DESTINATION share/icons/hicolor/scalable/apps)
install(DIRECTORY Documentation/images DESTINATION share/subsurface/Documentation) install(DIRECTORY Documentation/images DESTINATION share/subsurface/Documentation)
install(FILES ${DOCFILES} DESTINATION share/subsurface/Documentation) install(FILES ${DOCFILES} DESTINATION share/subsurface/Documentation)
install(DIRECTORY theme DESTINATION share/subsurface) install(DIRECTORY theme DESTINATION share/subsurface)
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-mobile DESTINATION bin)
else() else()
install(TARGETS ${SUBSURFACE_TARGET} DESTINATION bin) install(TARGETS ${SUBSURFACE_TARGET} DESTINATION bin)
if (SMARTTRAK_IMPORT) if (SMARTTRAK_IMPORT)
install(TARGETS ${SMTK_IMPORT_TARGET} DESTINATION bin) install(TARGETS ${SMTK_IMPORT_TARGET} DESTINATION bin)
endif()
endif()
if(DEFINED LIBMARBLEDEVEL)
install(
CODE "file(GLOB SSRFMARBLE_SHLIBS \"${LIBMARBLEDEVEL}/lib/libssrfmarblewidget.so*\")"
CODE "file(INSTALL \${SSRFMARBLE_SHLIBS} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)"
)
endif() endif()
endif()
if(DEFINED LIBMARBLEDEVEL)
install(
CODE "file(GLOB SSRFMARBLE_SHLIBS \"${LIBMARBLEDEVEL}/lib/libssrfmarblewidget.so*\")"
CODE "file(INSTALL \${SSRFMARBLE_SHLIBS} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)"
)
endif()
endif() endif()
if (MAKE_TESTS) if (MAKE_TESTS)