Skip to content

Commit

Permalink
fix msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmeagher committed Nov 1, 2024
1 parent e85b7a4 commit b45481a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions subprojects/packagefiles/cfitsio/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ SOVERSION = 10
cc = meson.get_compiler('c')
libm = cc.find_library('m', required: false)
zlib = dependency('zlib', method: 'pkg-config', required:true, fallback: ['zlib', 'zlib_dep'])
lib_deps = [libm,zlib]
lib_deps = [libm, zlib]
has_fortran = false

if cc.has_header_symbol('unistd.h', 'ftruncate')
add_project_arguments('-DHAVE_UNISTD_H', '-DHAVE_FTRUNCATE', language: 'c')
if cc.has_header('unistd.h')
add_project_arguments('-DHAVE_UNISTD_H',language: 'c')
# if cc.has_header_symbol('unistd.h', 'ftruncate')
# add_project_arguments('-DHAVE_FTRUNCATE', language: 'c')
# endif
else
add_project_arguments('-DYY_NO_UNISTD_H', language: 'c')
endif


# # if cc.get_id() != 'msvc'
# if host_machine.system() != 'windows'

Expand Down

0 comments on commit b45481a

Please sign in to comment.