Skip to content

Commit

Permalink
Merge pull request #128 from andrebq/add-macos-arm64
Browse files Browse the repository at this point in the history
feat: add cgo and static-lib for macos/arm64
  • Loading branch information
pwiecz authored May 11, 2024
2 parents 6bdd108 + 4ac4d43 commit 990b442
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cgo_darwin_arm64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build darwin && arm64

package fltk

// #cgo darwin,arm64 CXXFLAGS: -std=c++11
// #cgo darwin,arm64 CPPFLAGS: -I${SRCDIR}/lib/darwin/arm64 -I${SRCDIR}/include -I${SRCDIR}/include/FL/images -I${SRCDIR}/include/png -I${SRCDIR}/include/zlib -I${SRCDIR}/include/jpeg -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT
// #cgo darwin,arm64 LDFLAGS: ${SRCDIR}/lib/darwin/arm64/libfltk_images.a ${SRCDIR}/lib/darwin/arm64/libfltk_jpeg.a ${SRCDIR}/lib/darwin/arm64/libfltk_png.a ${SRCDIR}/lib/darwin/arm64/libfltk_z.a ${SRCDIR}/lib/darwin/arm64/libfltk_gl.a -framework OpenGL ${SRCDIR}/lib/darwin/arm64/libfltk_forms.a ${SRCDIR}/lib/darwin/arm64/libfltk.a -lm -lpthread -framework Cocoa
import "C"
91 changes: 91 additions & 0 deletions lib/darwin/arm64/FL/fl_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/* FL/fl_config.h. Generated from fl_config.cmake.in by CMake. */
/*
* Build configuration file for the Fast Light Tool Kit (FLTK).
*
* Copyright 1998-2021 by Bill Spitzak and others.
*
* This library is free software. Distribution and use rights are outlined in
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
* https://www.fltk.org/COPYING.php
*
* Please see the following page on how to report bugs and issues:
*
* https://www.fltk.org/bugs.php
*/

#ifndef _FL_fl_config_h_
#define _FL_fl_config_h_

/*
* FL_ABI_VERSION (ABI version)
*
* define FL_ABI_VERSION: 1xxyy for 1.x.y (xx,yy with leading zero)
*/

/* #undef FL_ABI_VERSION */


/*
* FLTK_HAVE_CAIRO
*
* Do we have the Cairo library available?
*/

/* #undef FLTK_HAVE_CAIRO */


/*
* FLTK_HAVE_CAIROEXT
*
* Do we have the Cairo library available and want extended Cairo use in FLTK ?
* This implies to link cairo.lib in all FLTK based apps.
*/

/* #undef FLTK_HAVE_CAIROEXT */


/*
* FLTK_USE_X11
*
* Do we use X11 for the current platform?
*
*/

/* #undef FLTK_USE_X11 */


/*
* FLTK_USE_CAIRO
*
* Do we use Cairo to draw to the display?
*
*/

/* #undef FLTK_USE_CAIRO */


/*
* FLTK_USE_WAYLAND
*
* Do we use Wayland for the current platform?
*
*/

/* #undef FLTK_USE_WAYLAND */


/*
* FLTK_USE_STD
*
* May we use std::string and std::vector for the current build?
*
* This is a build configuration option which allows FLTK to add some
* features based on std::string and std::vector in FLTK 1.4.x
*
*/

#define FLTK_USE_STD 0

#endif /* _FL_fl_config_h_ */
Binary file added lib/darwin/arm64/libfltk.a
Binary file not shown.
Binary file added lib/darwin/arm64/libfltk_forms.a
Binary file not shown.
Binary file added lib/darwin/arm64/libfltk_gl.a
Binary file not shown.
Binary file added lib/darwin/arm64/libfltk_images.a
Binary file not shown.
Binary file added lib/darwin/arm64/libfltk_jpeg.a
Binary file not shown.
Binary file added lib/darwin/arm64/libfltk_png.a
Binary file not shown.
Binary file added lib/darwin/arm64/libfltk_z.a
Binary file not shown.

0 comments on commit 990b442

Please sign in to comment.