Fix CMakeLists.txt for vulkanExamples.xcodeproj build, fix macOS storyboard for resizable window, set animation rate based on display refresh period

This commit is contained in:
Stephen Saunders 2022-05-04 00:43:14 -04:00
parent d1975e91ee
commit b1f10d7393
7 changed files with 71 additions and 47 deletions

View file

@ -11,6 +11,18 @@ function(buildExample EXAMPLE_NAME)
if(EXISTS ${EXAMPLE_FOLDER}/${EXAMPLE_NAME}.h)
SET(MAIN_HEADER ${EXAMPLE_FOLDER}/${EXAMPLE_NAME}.h)
ENDIF()
if(APPLE)
if(CMAKE_C_COMPILER_ID MATCHES "Clang\$")
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp")
set(OpenMP_C_LIB_NAMES "omp")
set(OpenMP_omp_LIBRARY /opt/local/lib/libomp/libomp.dylib)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang\$")
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp")
set(OpenMP_CXX_LIB_NAMES "omp")
set(OpenMP_omp_LIBRARY /opt/local/lib/libomp/libomp.dylib)
endif()
endif()
find_package(OpenMP)
# imgui example requires additional source files
IF(${EXAMPLE_NAME} STREQUAL "imgui")