made cmake play nice with visual studio

This commit is contained in:
Jacker 2014-09-15 23:43:28 +03:00
parent 0912523eba
commit 40dde76d6c

View file

@ -103,7 +103,15 @@ if(WIN32)
ExternalProject_Get_Property(bundled_curl binary_dir)
set(CURL_BUNDLED_LIBRARY "${binary_dir}/libcurl${CMAKE_STATIC_LIBRARY_SUFFIX}" wsock32 ws2_32 PARENT_SCOPE)
if(VSTUDIO)
if(DEBUG_BUILD)
set(CURL_BUNDLED_LIBRARY "${binary_dir}/lib/Debug/libcurl${CMAKE_STATIC_LIBRARY_SUFFIX}" wsock32 ws2_32 PARENT_SCOPE)
else(DEBUG_BUILD)
set(CURL_BUNDLED_LIBRARY "${binary_dir}/lib/Release/libcurl${CMAKE_STATIC_LIBRARY_SUFFIX}" wsock32 ws2_32 PARENT_SCOPE)
endif(DEBUG_BUILD)
else(VSTUDIO)
set(CURL_BUNDLED_LIBRARY "${binary_dir}/libcurl${CMAKE_STATIC_LIBRARY_SUFFIX}" wsock32 ws2_32 PARENT_SCOPE)
endif(VSTUDIO)
set(CURL_BUNDLED_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/libs/curl/include" PARENT_SCOPE)
endif(BUNDLED_CURL)
@ -452,11 +460,17 @@ if(BUNDLED_FREETYPE)
ExternalProject_Get_Property(bundled_freetype binary_dir)
if(MSVC)
if(VSTUDIO)
if(DEBUG_BUILD)
set(BUNDLED_FREETYPE_LIBRARIES "${binary_dir}/Debug/freetype${CMAKE_STATIC_LIBRARY_SUFFIX}" PARENT_SCOPE)
else(DEBUG_BUILD)
set(BUNDLED_FREETYPE_LIBRARIES "${binary_dir}/Release/freetype${CMAKE_STATIC_LIBRARY_SUFFIX}" PARENT_SCOPE)
endif(DEBUG_BUILD)
elseif(NMAKE_BUILD)
set(BUNDLED_FREETYPE_LIBRARIES "${binary_dir}/freetype${CMAKE_STATIC_LIBRARY_SUFFIX}" PARENT_SCOPE)
else()
else(VSTUDIO)
set(BUNDLED_FREETYPE_LIBRARIES "${binary_dir}/libfreetype${CMAKE_STATIC_LIBRARY_SUFFIX}" PARENT_SCOPE)
endif()
endif(VSTUDIO)
set(BUNDLED_FREETYPE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/libs/freetype/include" PARENT_SCOPE)
endif(BUNDLED_FREETYPE)
@ -470,18 +484,22 @@ if(BUNDLED_JANSSON)
ExternalProject_Get_Property(bundled_jansson binary_dir)
string(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype_upper)
if(WIN32 AND buildtype_upper MATCHES DEBUG)
if(WIN32 AND DEBUG_BUILD)
set(jansson_name "jansson_d${CMAKE_STATIC_LIBRARY_SUFFIX}")
else(WIN32 AND buildtype_upper MATCHES DEBUG)
else(WIN32 AND DEBUG_BUILD)
set(jansson_name "jansson${CMAKE_STATIC_LIBRARY_SUFFIX}")
endif(WIN32 AND buildtype_upper MATCHES DEBUG)
endif(WIN32 AND DEBUG_BUILD)
if(MSVC)
if(VSTUDIO)
if(DEBUG_BUILD)
set(BUNDLED_JASSON_LIBRARIES "${binary_dir}/lib/Debug/${jansson_name}" PARENT_SCOPE)
else(DEBUG_BUILD)
set(BUNDLED_JASSON_LIBRARIES "${binary_dir}/lib/Release/${jansson_name}" PARENT_SCOPE)
endif(DEBUG_BUILD)
else(NMAKE_BUILD)
set(BUNDLED_JASSON_LIBRARIES "${binary_dir}/lib/${jansson_name}" PARENT_SCOPE)
else()
else(VSTUDIO)
set(BUNDLED_JASSON_LIBRARIES "${binary_dir}/lib/lib${jansson_name}" PARENT_SCOPE)
endif()
endif(VSTUDIO)
set(BUNDLED_JASSON_INCLUDE_DIR "${binary_dir}/include" PARENT_SCOPE)
endif(BUNDLED_JANSSON)