Skip to content

Commit

Permalink
Fix OBJCXX debug flags (#128)
Browse files Browse the repository at this point in the history
* Fix OBJCXX debug flags

* Replace modifying CMAKE_CXX_FLAGS with add_compile_definitions and increase the minimum cmake version 3.12

---------

Co-authored-by: orangebtw <orangebtw@orangebtws-Mac-Pro.local>
  • Loading branch information
st0rmbtw and orangebtw authored Aug 15, 2024
1 parent 17769f0 commit 47feff8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Originally authored on 09/07/2015

cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.12)

project(LLGL)

Expand Down Expand Up @@ -105,11 +105,7 @@ macro(ADD_PROJECT_DEFINE TARGET_NAME IDENT)
endmacro()

macro(ADD_DEBUG_DEFINE IDENT)
if(MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D${IDENT}")
else(MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D${IDENT}")
endif(MSVC)
add_compile_definitions("$<$<CONFIG:Debug>:${IDENT}>")
endmacro()


Expand Down

0 comments on commit 47feff8

Please sign in to comment.