Commit 15a83984 authored by Adam Dingle's avatar Adam Dingle

Fixed #4947 (Add debug build option to Geary).

parent ebf8ce9f
......@@ -26,9 +26,14 @@ set(ARCHIVE_DEBUILD_FULL_NAME ${CMAKE_PROJECT_NAME}_${VERSION}.orig.tar.xz)
set(GLADE_FILES ui/composer.glade ui/login.glade ui/message.glade ui/password-dialog.glade ui/toolbar.glade)
option(DEBUG "Build for debugging." OFF)
option(ICON_UPDATE "Run gtk-update-icon-cache after the install." ON)
option(DESKTOP_UPDATE "Run update-desktop-database after the install." ON)
if (DEBUG)
message(STATUS "Debug build")
endif ()
if (ICON_UPDATE)
message(STATUS "Icon cache will be updated")
endif ()
......
......@@ -20,6 +20,9 @@ configure_help() {
printf "\t--prefix=PREFIX\t\tPrepend PREFIX to program installation paths.\n"
printf "\t\t\t\t[%s]\n" $DEFAULT_PREFIX
printf "\t--debug\n"
printf "\t\t\t\tBuild for debugging.\n"
printf "\t--disable-schemas-compile\n"
printf "\t\t\t\tDisable compiling the GSettings schema.\n"
......@@ -59,6 +62,10 @@ do
CMDLINE="${CMDLINE} -DCMAKE_INSTALL_PREFIX=${value}"
;;
--debug)
CMDLINE="${CMDLINE} -DDEBUG=ON"
;;
--disable-schemas-compile)
CMDLINE="${CMDLINE} -DGSETTINGS_COMPILE=OFF"
CMDLINE="${CMDLINE} -DGSETTINGS_COMPILE_IN_PLACE=OFF"
......
......@@ -380,9 +380,15 @@ set(CFLAGS
-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\"
-DLANGUAGE_SUPPORT_DIRECTORY=\"${LANGUAGE_SUPPORT_DIRECTORY}\"
-g
-O2
)
if (NOT DEBUG)
set(CFLAGS
${CFLAGS}
-O2
)
endif ()
set(LIB_PATHS ${DEPS_LIBRARY_DIRS})
link_directories(${LIB_PATHS})
add_definitions(${CFLAGS})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment