Created
July 19, 2018 11:20
-
-
Save spacepluk/c8467f1b93754821c26bbfb58f90160a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.11 FATAL_ERROR) | |
project(midithingy) | |
# as_submodule trick -- from Daniel Pfeifer's talk (https://bit.ly/2KXVKAs) | |
set(as_subproject bx bimg bgfx) | |
macro(find_package) | |
if(NOT "${ARGV0}" IN_LIST as_subproject) | |
message("BEFORE find_package\(" ${ARGV} "\)") | |
_find_package(${ARGV}) | |
message("AFTER find_package\(" ${ARGV} "\)") | |
endif() | |
endmacro() | |
add_subdirectory(bx) | |
add_subdirectory(bimg) | |
add_subdirectory(bgfx) | |
## ^^^ as_submodule trick | |
find_package(glfw3 REQUIRED) | |
find_package(bgfx REQUIRED) | |
add_executable(midithingy src/main.cpp) | |
target_compile_features(midithingy PUBLIC cxx_std_14) | |
target_link_libraries(midithingy PRIVATE bgfx::bgfx bgfx::nanovg glfw) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment