Enable conditional compilation of examples.

This commit is contained in:
Maxim Poliakovski 2020-06-16 21:22:57 +02:00
parent 35110bf174
commit d658d8361b

View File

@ -84,6 +84,10 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)
# Code generation options
#--------------------------------------
option(MINIFB_BUILD_EXAMPLES "Build minifb example programs" TRUE)
# Set GCC/Clang flags # Set GCC/Clang flags
#-------------------------------------- #--------------------------------------
if (NOT MSVC) if (NOT MSVC)
@ -194,6 +198,7 @@ link_libraries(minifb)
# Examples # Examples
#-------------------------------------- #--------------------------------------
if (MINIFB_BUILD_EXAMPLES)
if(NOT IOS) if(NOT IOS)
add_executable(noise add_executable(noise
@ -229,4 +234,6 @@ else()
endif() endif()
endif()
message("Done " ${PROJECT_NAME}) message("Done " ${PROJECT_NAME})