From e52eb66fce6e8916c1df07dab9ebf12921333ade Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sun, 23 Jul 2023 09:57:44 -0400 Subject: [PATCH] Add mac-specific compile pathway --- CMakeLists.txt | 2 ++ main.cpp | 2 +- platform_includes.h | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 platform_includes.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fbb5c8c..6b3dea5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ PROJECT ( example ) cmake_minimum_required( VERSION 3.16 ) +#add_compile_options(-DMAC) + FIND_PACKAGE ( PkgConfig REQUIRED ) PKG_CHECK_MODULES( GTK REQUIRED gtkmm-3.0) INCLUDE_DIRECTORIES ( ${GTK_INCLUDE_DIRS} ) diff --git a/main.cpp b/main.cpp index 12c36f9..4fcc385 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,4 @@ -#include +#include "platform_includes.h" using namespace Glib; using namespace Gtk; diff --git a/platform_includes.h b/platform_includes.h new file mode 100644 index 0000000..e244f8a --- /dev/null +++ b/platform_includes.h @@ -0,0 +1,5 @@ +#if defined MAC + #include +#else + #include +#endif \ No newline at end of file