Skip to content
Snippets Groups Projects
Commit d3b6cf72 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

WIP: COMP: allow debug build of autoconf projects #1

parent b405e515
Branches
Tags
No related merge requests found
......@@ -26,7 +26,7 @@ find_path( SHARK_INCLUDE_DIR shark/Core/Shark.h
PATH_SUFFIXES include include/shark shark)
find_library( SHARK_LIBRARY
NAMES shark
NAMES shark shark_debug
PATHS "${SHARK_SEARCH_PATH}"
PATH_SUFFIXES lib
)
......
......@@ -20,12 +20,12 @@ set(GDAL_CONFIGURE_COMMAND)
set(GDAL_BUILD_COMMAND)
set(GDAL_INSTALL_COMMAND)
if(UNIX)
set(GDAL_SB_EXTRA_OPTIONS "" CACHE STRING "Extra options to be passed to GDAL configure script")
mark_as_advanced(GDAL_SB_EXTRA_OPTIONS)
#Convert GDAL_SB_EXTRA_OPTIONS to a list to allow to add multiple instructions to the CONFIGURE_COMMAND
separate_arguments(GDAL_SB_EXTRA_OPTIONS)
#we don't do any framework build on osx. So let's be sure on case of gdal
if(APPLE)
list(APPEND GDAL_SB_CONFIG "--with-macosx-framework=no")
......@@ -42,9 +42,7 @@ if(UNIX)
endif()
set(GDAL_CONFIGURE_COMMAND "${SB_ENV_CONFIGURE_CMD};${GDAL_SB_SRC}/configure"
--prefix=${SB_INSTALL_PREFIX}
--enable-static=no
--enable-shared=yes
${SB_CONFIGURE_ARGS}
--with-cfitsio=no
--with-dods-root=no
--with-dwgdirect=no
......
......@@ -36,11 +36,8 @@ if(UNIX)
CONFIGURE_COMMAND
${SB_ENV_CONFIGURE_CMD}
${GEOTIFF_SB_SRC}/configure
--prefix=${SB_INSTALL_PREFIX}
--enable-static=no
${SB_CONFIGURE_ARGS}
${GEOTIFF_SB_CONFIG}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
LOG_BUILD 1
LOG_INSTALL 1
)
......
......@@ -69,7 +69,7 @@ endif()
option(BUILD_EXAMPLES " Build the OTB Examples directory" OFF)
option(USE_DEFAULT_INSTALL_PREFIX "Install superbuild to default prefix /usr/local for unix" OFF)
#get version of OTB from source_dir/CMakeLists.txt
get_version(
INPUT_FILE "${CMAKE_SOURCE_DIR}/../CMakeLists.txt"
......@@ -175,6 +175,12 @@ else()
list(APPEND SB_CONFIGURE_ARGS "--enable-shared=no")
endif()
if(CMAKE_BUILD_TYPE MATCHES "Debug")
list(APPEND SB_CONFIGURE_ARGS "--enable-debug=yes")
else()
list(APPEND SB_CONFIGURE_ARGS "--enable-debug=no")
endif()
if(UNIX)
if(APPLE)
set(SB_CMAKE_COMMAND env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment