Modified FindSFML.cmake for a better handling of debug libraries

Fixed Macros.cmake (the last modification introduced a bug when generating nmake makefiles)

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1573 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-10-05 21:19:30 +00:00
parent dac1ade7c4
commit dd63420b52
2 changed files with 27 additions and 22 deletions

View file

@ -33,9 +33,12 @@ macro(sfml_static_add_libraries target)
if(NOT ${lib} MATCHES ".*\\.lib")
set(lib ${lib}.lib)
endif()
# we add " so that the path will be put into "",
# making possible to have spaces in it
set(LIBRARIES "${LIBRARIES} &quot\\;${lib}&quot\\;")
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
set(LIBRARIES "${LIBRARIES} &quot\\;${lib}&quot\\;")
else()
set(LIBRARIES "${LIBRARIES} ${lib}")
endif()
endforeach()
set_target_properties(${target} PROPERTIES STATIC_LIBRARY_FLAGS ${LIBRARIES})
endif()