mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Allow for debug builds with debug information.
This commit is contained in:
parent
b93deee276
commit
69e8a9377c
@ -22,8 +22,10 @@ else()
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
|
||||
# Default to release mode
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
# Determine if build mode
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
add_compile_options(-g)
|
||||
endif()
|
||||
|
||||
# Include mingw runntime into the binary
|
||||
if (GCC OR MINGW)
|
||||
|
@ -90,6 +90,12 @@ if(ENABLE_MYSQL)
|
||||
target_link_libraries(SqModule MySQL::MySQL)
|
||||
endif()
|
||||
endif()
|
||||
# Determine if build mode
|
||||
if(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
target_compile_definitions(SqModule PRIVATE NDEBUG=1)
|
||||
else()
|
||||
target_compile_definitions(SqModule PRIVATE _DEBUG=1 SQMOD_EXCEPTLOC=1)
|
||||
endif()
|
||||
# Force 32-bit binaries when necessary
|
||||
if(FORCE_32BIT_BIN)
|
||||
set_target_properties(SqModule PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
|
||||
|
@ -14,6 +14,12 @@ add_library(Sqrat STATIC sqrat.cpp sqrat.h
|
||||
sqrat/sqratTypes.h
|
||||
sqrat/sqratUtil.h
|
||||
)
|
||||
# Determine if build mode
|
||||
if(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
target_compile_definitions(Sqrat PRIVATE NDEBUG=1)
|
||||
else()
|
||||
target_compile_definitions(Sqrat PRIVATE _DEBUG=1)
|
||||
endif()
|
||||
# Set library compiler options
|
||||
target_compile_definitions(Sqrat PUBLIC SCRAT_USE_EXCEPTIONS=1 SCRAT_USE_CXX11_OPTIMIZATIONS=1)
|
||||
# Set specific compiler options
|
||||
|
@ -40,6 +40,12 @@ add_library(Squirrel STATIC
|
||||
stdlib/sqstdstring.cpp
|
||||
stdlib/sqstdsystem.cpp
|
||||
)
|
||||
# Determine if build mode
|
||||
if(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
target_compile_definitions(Squirrel PRIVATE NDEBUG=1)
|
||||
else()
|
||||
target_compile_definitions(Squirrel PRIVATE _DEBUG=1)
|
||||
endif()
|
||||
# Make sure Squirrel knows this is 64 bit
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
target_compile_definitions(Squirrel PUBLIC _SQ64)
|
||||
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
//#define VCMP_SDK_2_1
|
||||
// Choose which SDK to use
|
||||
#ifdef VCMP_SDK_2_1
|
||||
#include "vcmp21.h"
|
||||
|
Loading…
Reference in New Issue
Block a user