@@ -17,12 +17,12 @@ set(CMAKE_AUTORCC ON)
1717set (CMAKE_AUTOUIC ON )
1818set (CMAKE_CXX_STANDARD_REQUIRED ON )
1919
20- if (MSVC )
20+ if (CMAKE_CXX_COMPILER_ID STREQUAL " MSVC" )
2121 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus" )
2222 set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd" )
2323 set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD" )
2424 set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD" )
25- endif (MSVC )
25+ endif ()
2626
2727# -----------------------------------------------------------------------------
2828# Dependencies
@@ -56,11 +56,11 @@ else()
5656 set_target_properties (FreeImageLib PROPERTIES EXCLUDE_FROM_ALL ON )
5757
5858 # Remove /permissive- for OpenEXR and FreeImage
59- if (MSVC )
59+ if (CMAKE_CXX_COMPILER_ID STREQUAL " MSVC" )
6060 target_compile_options (OpenEXR PRIVATE /permissive )
6161 target_compile_options (FreeImage PRIVATE /permissive )
6262 target_compile_options (FreeImageLib PRIVATE /permissive ) # we don't need the static library, but just in case someone does build it
63- endif (MSVC )
63+ endif ()
6464endif ()
6565
6666# -----------------------------------------------------------------------------
@@ -209,7 +209,7 @@ set_target_properties(${PROJECT}
209209# Miscellaneous
210210# -----------------------------------------------------------------------------
211211# Automatically set the debug environment (command + working directory) for MSVC
212- if (MSVC )
212+ if (CMAKE_CXX_COMPILER_ID STREQUAL " MSVC" )
213213 set_property (TARGET ${PROJECT} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $<IF :$<CONFIG :DEBUG >,${ManiVault_INSTALL_DIR} /Debug ,$<IF :$<CONFIG :RELWITHDEBINFO >,${ManiVault_INSTALL_DIR} /RelWithDebInfo ,${ManiVault_INSTALL_DIR} /Release >>)
214214 set_property (TARGET ${PROJECT} PROPERTY VS_DEBUGGER_COMMAND $<IF :$<CONFIG :DEBUG >,"${ManiVault_INSTALL_DIR} /Debug /ManiVault Studio .exe ",$<IF :$<CONFIG :RELWITHDEBINFO >,"${ManiVault_INSTALL_DIR} /RelWithDebInfo /ManiVault Studio .exe ","${ManiVault_INSTALL_DIR} /Release /ManiVault Studio .exe ">>)
215215endif ()
0 commit comments