Fixed double quotes in VS 2010 projects generated by CMake for static builds

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1625 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-11-07 19:51:33 +00:00
parent 4ed1d8861c
commit e895d6516b
2 changed files with 6 additions and 8 deletions

View File

@ -27,14 +27,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND "${CMAKE_CXX_COMPILER}" "-dumpversion" OUTPUT_VARIABLE GCC_VERSION_OUTPUT)
string(REGEX REPLACE "([0-9]+\\.[0-9]+).*" "\\1" GCC_VERSION "${GCC_VERSION_OUTPUT}")
elseif(MSVC_VERSION EQUAL 1400)
set(COMPILER_MSVC 1)
set(MSVC_VERSION 2005)
set(COMPILER_MSVC 2005)
elseif(MSVC_VERSION EQUAL 1500)
set(COMPILER_MSVC 1)
set(MSVC_VERSION 2008)
set(COMPILER_MSVC 2008)
elseif(MSVC_VERSION EQUAL 1600)
set(COMPILER_MSVC 1)
set(MSVC_VERSION 2010)
set(COMPILER_MSVC 2010)
else()
message(WARNING "Unsupported compiler")
return()

View File

@ -33,8 +33,9 @@ macro(sfml_static_add_libraries target)
if(NOT ${lib} MATCHES ".*\\.lib")
set(lib ${lib}.lib)
endif()
if(CMAKE_CONFIGURATION_TYPES) # this condition is true when generator is "Visual Studio solution"
# we add " so that the path will be put inside "", making possible to have spaces in it
if(MSVC_IDE AND COMPILER_MSVC LESS 2010)
# for Visual Studio projects < 2010, we must add double quotes
# around paths because they may contain spaces
set(LIBRARIES "${LIBRARIES} &quot\\;${lib}&quot\\;")
else()
set(LIBRARIES "${LIBRARIES} ${lib}")