From 8314a20c56632a023ef0542a3b4ca11cc0b0481e Mon Sep 17 00:00:00 2001 From: Wietse Date: Mon, 14 Mar 2016 23:14:31 +0100 Subject: [PATCH] Update CMakeLists.txt Changed "add_definitions" to "add_compile_options" to fix building with NMake. Using "add_definitions" adds "/MP" to the resource compiler options which results in a fatal error when run with NMake. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8434e4628..538d2665b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall" ) elseif(MSVC) # enable multi-core compilation with MSVC - add_definitions(/MP) + add_compile_options(/MP) endif() INCLUDE (FindPkgConfig) @@ -367,4 +367,4 @@ if(WIN32) add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM) add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) endif(MSVC12 OR MSVC14) -endif (WIN32) \ No newline at end of file +endif (WIN32)