diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b18c605..a58a3cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,5 +27,11 @@ find_package(LibArchive REQUIRED) add_executable(sibs ${SOURCE_FILES}) include_directories(${CURL_INCLUDE_DIR} ${LibArchive_INCLUDE_DIR} "depends/libninja/include") -target_link_libraries(sibs ${CURL_LIBRARIES} ${LibArchive_LIBRARIES} -lgit2) -target_compile_options(sibs PRIVATE -Wall -Wextra -Werror=return-type -fdiagnostics-show-option -fexceptions) + +if(WIN32) + target_link_libraries(sibs ${CURL_LIBRARIES} ${LibArchive_LIBRARIES} "${CMAKE_CURRENT_SOURCE_DIR}/msvc/git2.lib") + target_compile_options(sibs PRIVATE /Wall) +else() + target_link_libraries(sibs ${CURL_LIBRARIES} ${LibArchive_LIBRARIES} -lgit2) + target_compile_options(sibs PRIVATE -Wall -Wextra -Werror=return-type -fdiagnostics-show-option -fexceptions) +endif() |