Skip to content

Commit

Permalink
TargetConditionals: add TARGET_OS_SIMULATOR if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
kencu committed Apr 2, 2021
1 parent 81d0629 commit 333bb8f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ Wrapped headers and replaced functions are:
<code>glext.h</code> and thereby match behaviour of newer systems.</td>
<td>OSX10.6</td>
</tr>
<tr>
<td><code>TargetConditionals.h</code></td>
<td>Adds definition for <code>TARGET_OS_SIMULATOR</code> if needed.</td>
<td>OSX10.10</td>
</tr>
</table>

For information on building this library outside MacPorts, see BUILDING.txt.
26 changes: 26 additions & 0 deletions include/TargetConditionals.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2021 Ken Cunningham <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/


/*
* TARGET_OS_SIMULATOR replaced TARGET_IPHONE_SIMULATOR and is not defined in older os versions
*/

#include_next <TargetConditionals.h>

#ifndef TARGET_OS_SIMULATOR
# define TARGET_OS_SIMULATOR 0
#endif

0 comments on commit 333bb8f

Please sign in to comment.