-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
546120a
commit 35559ab
Showing
8 changed files
with
136 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(BetterSpades C) | ||
|
||
add_subdirectory(src) | ||
set(BETTERSPADES_MAJOR 0) | ||
set(BETTERSPADES_MINOR 1) | ||
set(BETTERSPADES_PATCH 4) | ||
|
||
option(ENABLE_TOUCH "Enable touch support including ingame overlay" OFF) | ||
option(ENABLE_ANDROID_FILE "Use SDL's file functions" OFF) | ||
option(ENABLE_OPENGLES "Build for OpenGL ES" OFF) | ||
option(ENABLE_SDL "Build against SDL backend" OFF) | ||
option(ENABLE_GLFW "Build against GLFW3 backend" ON) | ||
option(ENABLE_SOUND "Enable sound support using OpenAL" ON) | ||
|
||
if((ENABLE_ANDROID_FILE OR ENABLE_TOUCH OR ENABLE_OPENGLES) AND NOT ENABLE_SDL) | ||
message(FATAL_ERROR "Enable SDL to use ENABLE_ANDROID_FILE, ENABLE_TOUCH or ENABLE_OPENGLES") | ||
endif() | ||
if(ENABLE_SDL AND ENABLE_GLFW) | ||
message(FATAL_ERROR "Only one backend must be selected") | ||
endif() | ||
if(NOT ENABLE_SDL AND NOT ENABLE_GLFW) | ||
message(FATAL_ERROR "Enable SDL or GLFW") | ||
endif() | ||
|
||
add_subdirectory(src) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying | ||
# file Copyright.txt or https://cmake.org/licensing for details. | ||
|
||
#.rst: | ||
# Findglfw3 | ||
# ------- | ||
# | ||
# Finds the glfw3 library | ||
# | ||
# This will define the following variables:: | ||
# | ||
# glfw3_FOUND - True if the system has the glfw3 library | ||
# | ||
# and also the following imported target: | ||
# | ||
# glfw3::glfw3 | ||
# | ||
find_package(PkgConfig) | ||
pkg_check_modules(PC_glfw3 QUIET glfw3) | ||
|
||
find_path(glfw3_INCLUDE_DIR | ||
NAMES GLFW/glfw3.h | ||
PATHS ${PC_glfw3_INCLUDE_DIRS} ../../deps | ||
PATH_SUFFIXES GLFW | ||
) | ||
find_library(glfw3_LIBRARY | ||
NAMES glfw | ||
PATHS ${PC_glfw3_LIBRARY_DIRS} ../../deps | ||
) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(glfw3 | ||
FOUND_VAR glfw3_FOUND | ||
REQUIRED_VARS | ||
glfw3_LIBRARY | ||
glfw3_INCLUDE_DIR | ||
) | ||
|
||
if (glfw3_FOUND) | ||
add_library(glfw3::glfw3 STATIC IMPORTED) | ||
set_target_properties(glfw3::glfw3 PROPERTIES | ||
IMPORTED_LOCATION ${glfw3_LIBRARY} | ||
INTERFACE_INCLUDE_DIRECTORIES ${glfw3_INCLUDE_DIR} | ||
) | ||
endif (glfw3_FOUND) |
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
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
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
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
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