Skip to content

Commit

Permalink
fix: trying to fix compilation on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ntamas committed Sep 13, 2023
1 parent a15bc5a commit 70e9108
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ endif()

# Check for headers and symbols
check_include_file("getopt.h" HAVE_GETOPT_H)
check_include_file("libintl.h" HAVE_LIBINTL_H)
check_symbol_exists(isatty unistd.h HAVE_ISATTY)

# Turn on all compiler warnings
Expand Down Expand Up @@ -65,6 +66,10 @@ add_executable(stitch ${STITCH_SOURCES})
target_include_directories(stitch PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src ${CURL_INCLUDE_DIRS})
target_link_libraries(stitch ${MATH_LIBRARY} CURL::libcurl)

if(WIN32)
add_compile_definitions(_USE_MATH_DEFINES)
endif()

if(JPEG_FOUND)
target_link_libraries(stitch JPEG::JPEG)
endif()
Expand Down
2 changes: 2 additions & 0 deletions src/getopt.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "config.h"

/* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to [email protected]
Expand Down

0 comments on commit 70e9108

Please sign in to comment.