Enable conditional compilation of examples.
This commit is contained in:
parent
35110bf174
commit
d658d8361b
@ -84,6 +84,10 @@ set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# Code generation options
|
||||
#--------------------------------------
|
||||
option(MINIFB_BUILD_EXAMPLES "Build minifb example programs" TRUE)
|
||||
|
||||
# Set GCC/Clang flags
|
||||
#--------------------------------------
|
||||
if (NOT MSVC)
|
||||
@ -194,7 +198,8 @@ link_libraries(minifb)
|
||||
|
||||
# Examples
|
||||
#--------------------------------------
|
||||
if(NOT IOS)
|
||||
if (MINIFB_BUILD_EXAMPLES)
|
||||
if(NOT IOS)
|
||||
|
||||
add_executable(noise
|
||||
tests/noise.c
|
||||
@ -212,7 +217,7 @@ if(NOT IOS)
|
||||
tests/multiple_windows.c
|
||||
)
|
||||
|
||||
else()
|
||||
else()
|
||||
|
||||
add_executable(noise
|
||||
tests/ios/main.m
|
||||
@ -227,6 +232,8 @@ else()
|
||||
|
||||
add_definitions(-DTVOS_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
message("Done " ${PROJECT_NAME})
|
||||
|
Loading…
Reference in New Issue
Block a user