From b219c76e81b8da033976a6b224f466665fa07ed9 Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Tue, 1 May 2018 13:18:05 +0200 Subject: [PATCH] Fixed issues with MSVC/CMake build macros --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ab692d..6ca3f0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,11 @@ if (NOT WIN32) endif (NOT WIN32) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") -set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") +if (NOT MSVC) + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") +else (NOT MSVC) + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__=__FILE__") +endif (NOT MSVC) # PROGRAMS: add_executable(breakhack