Created
February 5, 2021 07:15
-
-
Save avinayak/b79991439ddc5d86b8f669e0e1e8082e to your computer and use it in GitHub Desktop.
CMakeList.txt for SDL2 Projects in CLion
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.17) | |
project(Pong) | |
set(CMAKE_CXX_STANDARD 14) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") | |
add_executable(Pong main.cpp pong.cpp pong.h) | |
INCLUDE(FindPkgConfig) | |
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2) | |
PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0) | |
INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2IMAGE_INCLUDE_DIRS}) | |
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${SDL2_LIBRARIES} ${SDL2IMAGE_LIBRARIES}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment