[mdZ80] CMakeLists.txt: Use SET_MSVC_DEBUG_PATH().
authorDavid Korth <gerbilsoft@gerbilsoft.com>
Wed, 2 Sep 2015 05:03:57 +0000 (01:03 -0400)
committerDavid Korth <gerbilsoft@gerbilsoft.com>
Wed, 2 Sep 2015 05:03:57 +0000 (01:03 -0400)
src/libgens/mdZ80/CMakeLists.txt

index cb5f064..f33108b 100644 (file)
@@ -24,23 +24,10 @@ SET_SOURCE_FILES_PROPERTIES(${mdZ80_ASM_NASM_SRCS}
 # Build the library. #
 ######################
 
-SET(MDZ80_PDB_FILE "${CMAKE_CURRENT_BINARY_DIR}/mdZ80.pdb")
-
-IF(MSVC)
-       # CMake seems to use weird settings for the PDB file.
-       # (at least version 2.8.12.2; 3.0.0 might be different)
-       STRING(REGEX REPLACE
-               "/Fd<OBJECT_DIR>/${_FS_C}"
-               "/Fd${MDZ80_PDB_FILE}"
-               CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT}")
-       STRING(REGEX REPLACE
-               "/Fd<OBJECT_DIR>/${_FS_CXX}"
-               "/Fd${MDZ80_PDB_FILE}"
-               CMAKE_CXX_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT}")
-ENDIF(MSVC)
-
 ENABLE_LANGUAGE(ASM_NASM)
 ADD_LIBRARY(mdZ80 STATIC
        ${mdZ80_SRCS}
        ${mdZ80_ASM_NASM_SRCS}
        )
+INCLUDE(SetMSVCDebugPath)
+SET_MSVC_DEBUG_PATH(mdZ80)