Last active
February 16, 2019 13:37
-
-
Save junwatu/e556c38d0f0474556e884963b22af9d3 to your computer and use it in GitHub Desktop.
Cmake SDL2
This file contains 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.0) | |
project(test) | |
find_path(SDL2_INCLUDE_DIR SDL2/SDL.h) | |
find_library(SDL2_LIBRARY SDL2) | |
find_library(SDL2_MAIN SDL2main) | |
add_executable(main main.cpp) | |
target_include_directories(main PUBLIC ${SDL2_INCLUDE_DIR}) | |
target_link_libraries(main PRIVATE ${SDL2_LIBRARY} ${SDL2_MAIN}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment