Add debug for InstallLibTCC cmake script.
@@ -33,12 +33,18 @@ include(Portability)
set(LIBTCC_INSTALL_PREFIX "${PROJECT_OUTPUT_DIR}/libtcc")
file(MAKE_DIRECTORY ${LIBTCC_INSTALL_PREFIX})
+if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+ set(LIBTCC_DEBUG "--debug")
+else()
+ set(LIBTCC_DEBUG)
+endif()
+
# Configure
if(PROJECT_OS_FAMILY STREQUAL unix)
- set(LIBTCC_CONFIGURE ./configure --prefix=${LIBTCC_INSTALL_PREFIX} --disable-static --with-libgcc --with-selinux)
+ set(LIBTCC_CONFIGURE ./configure --prefix=${LIBTCC_INSTALL_PREFIX} ${LIBTCC_DEBUG} --disable-static --with-libgcc --with-selinux)
elseif(PROJECT_OS_FAMILY STREQUAL win32)
if(PROJECT_OS_NAME STREQUAL MinGW)
- set(LIBTCC_CONFIGURE ./configure --prefix=${LIBTCC_INSTALL_PREFIX} --config-mingw32 --disable-static --with-libgcc --with-selinux)
+ set(LIBTCC_CONFIGURE ./configure --prefix=${LIBTCC_INSTALL_PREFIX} ${LIBTCC_DEBUG} --config-mingw32 --disable-static --with-libgcc --with-selinux)
else()
set(LIBTCC_CONFIGURE "")
endif()
