Simplify condition for using rpcrt4 library on Windows
Drop the CMAKE_BUILD_ON_VISUAL_STUDIO variable and hard-code the condition at its only use.
This commit is contained in:
parent
2370a99400
commit
92b835ec9d
|
@ -144,17 +144,6 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
|
||||||
set(CMAKE_BUILD_ON_VISUAL_STUDIO 0)
|
|
||||||
if(WIN32 AND NOT UNIX AND NOT MINGW)
|
|
||||||
set(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# a macro to determine the generator and ctest executable to use
|
# a macro to determine the generator and ctest executable to use
|
||||||
# for testing. Simply to improve readability of the main script.
|
# for testing. Simply to improve readability of the main script.
|
||||||
|
|
|
@ -556,8 +556,8 @@ if(APPLE)
|
||||||
target_link_libraries(CMakeLib "-framework CoreFoundation")
|
target_link_libraries(CMakeLib "-framework CoreFoundation")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW)
|
if(WIN32 AND NOT UNIX)
|
||||||
# We need the rpcrt4 library for at least the VS7-VC10 generators.
|
# We need the rpcrt4 library on Windows.
|
||||||
target_link_libraries(CMakeLib rpcrt4)
|
target_link_libraries(CMakeLib rpcrt4)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue