Merge pull request #41 from maximumspatium/master
Enable conditional compilation of examples.
This commit is contained in:
commit
2110dc18ac
@ -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,38 +198,41 @@ link_libraries(minifb)
|
|||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
if(NOT IOS)
|
if (MINIFB_BUILD_EXAMPLES)
|
||||||
|
if(NOT IOS)
|
||||||
|
|
||||||
add_executable(noise
|
add_executable(noise
|
||||||
tests/noise.c
|
tests/noise.c
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(input_events
|
add_executable(input_events
|
||||||
tests/input_events.c
|
tests/input_events.c
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(input_events_cpp
|
add_executable(input_events_cpp
|
||||||
tests/input_events_cpp.cpp
|
tests/input_events_cpp.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(multiple_windows
|
add_executable(multiple_windows
|
||||||
tests/multiple_windows.c
|
tests/multiple_windows.c
|
||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
add_executable(noise
|
add_executable(noise
|
||||||
tests/ios/main.m
|
tests/ios/main.m
|
||||||
tests/ios/AppDelegate.h
|
tests/ios/AppDelegate.h
|
||||||
tests/ios/AppDelegate.m
|
tests/ios/AppDelegate.m
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0" CACHE STRING "Set CMake deployment target" ${FORCE_CACHE})
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0" CACHE STRING "Set CMake deployment target" ${FORCE_CACHE})
|
||||||
|
|
||||||
target_include_directories(noise PRIVATE src)
|
target_include_directories(noise PRIVATE src)
|
||||||
target_include_directories(noise PRIVATE src/ios)
|
target_include_directories(noise PRIVATE src/ios)
|
||||||
|
|
||||||
add_definitions(-DTVOS_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
|
add_definitions(-DTVOS_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user