From 0d01f4f90bafa8ddd3495c291f1fd9c511c489a9 Mon Sep 17 00:00:00 2001 From: scottWakeling Date: Fri, 23 Dec 2011 16:29:05 +0000 Subject: [PATCH] Fix semi-colons being inserted into ldflags It is causing clang++ to error when linking game{cpu}.dylib --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c56f57..50107cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,25 +152,25 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") if (cpu STREQUAL "x86_64") add_definitions(-arch x86_64 -mmacosx-version-min=10.6) - set(ldflags ${ldflags} "-arch x86_64 -mmacosx-version-min=10.6") + set(ldflags "${ldflags} -arch x86_64 -mmacosx-version-min=10.6") elseif (cpu STREQUAL "x86") CHECK_CXX_COMPILER_FLAG("-arch i386" cxx_has_arch_i386) if (cxx_has_arch_i386) add_definitions(-arch i386) - set(ldflags ${ldflags} "-arch i386") + set(ldflags "${ldflags} -arch i386") endif() add_definitions(-mmacosx-version-min=10.4) - set(ldflags ${ldflags} "-mmacosx-version-min=10.4") + set(ldflags "${ldflags} -mmacosx-version-min=10.4") elseif (cpu STREQUAL "ppc") CHECK_CXX_COMPILER_FLAG("-arch ppc" cxx_has_arch_ppc) if (cxx_has_arch_ppc) add_definitions(-arch ppc) - set(ldflags ${ldflags} "-arch ppc") + set(ldflags "${ldflags} -arch ppc") endif() add_definitions(-mmacosx-version-min=10.4) - set(ldflags ${ldflags} "-mmacosx-version-min=10.4") + set(ldflags "${ldflags} -mmacosx-version-min=10.4") else() message(FATAL_ERROR "Unsupported CPU architecture for OSX") endif() @@ -179,7 +179,7 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") else() if (cpu STREQUAL "x86" AND X86) add_definitions(-m32) - set(ldflags ${ldflags} "-m32") + set(ldflags "${ldflags} -m32") endif() if (os STREQUAL "linux")