Add 3rdparty getopt for MSVC

This commit is contained in:
Jonas Kvinge
2022-02-06 16:55:11 +01:00
parent 3730bd04a4
commit a1735278df
6 changed files with 674 additions and 7 deletions

View File

@@ -313,6 +313,12 @@ if(WIN32)
endif()
endif()
if(WIN32 AND MSVC)
add_subdirectory(3rdparty/getopt)
set(GETOPT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/getopt)
set(GETOPT_LIBRARIES getopt)
endif()
if(WIN32 AND NOT MSVC)
# RC compiler
string(REPLACE "gcc" "windres" CMAKE_RC_COMPILER_INIT ${CMAKE_C_COMPILER})