Last active
May 3, 2017 14:40
-
-
Save alexpana/67eb318a19d05fc4ad3e to your computer and use it in GitHub Desktop.
Getting started with CLion and SDL2 on Windows
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
# Find the include directory which contains SDL.h | |
FIND_PATH(SDL2_INCLUDE_DIR SDL.h HINTS $ENV{SDL2} PATH_SUFFIXES include/SDL2) | |
# Find the library libSDL2.a | |
FIND_LIBRARY(SDL2_LIBRARY SDL2 HINTS $ENV{SDL2} PATH_SUFFIXES lib) | |
# Find the library libSDL2main.a | |
FIND_LIBRARY(SDL2MAIN_LIBRARY SDL2main HINTS $ENV{SDL2} PATH_SUFFIXES lib) | |
INCLUDE(FindPackageHandleStandardArgs) | |
# Define SDL2_FOUND variable | |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR) | |
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
FIND_PATH(SDL2_IMAGE_INCLUDE_DIR SDL_image.h HINTS $ENV{SDL2IMAGE}/i686-w64-mingw32 PATH_SUFFIXES include/SDL2) | |
FIND_LIBRARY(SDL2_IMAGE_LIBRARY SDL2_image HINTS $ENV{SDL2IMAGE}/i686-w64-mingw32 PATH_SUFFIXES lib) | |
INCLUDE(FindPackageHandleStandardArgs) | |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_IMAGE REQUIRED_VARS SDL2_IMAGE_LIBRARY SDL2_IMAGE_INCLUDE_DIR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment