aboutsummaryrefslogtreecommitdiff
path: root/smelt
diff options
context:
space:
mode:
authorGravatar Gary Wang <wzc782970009@gmail.com> 2019-06-02 01:22:18 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-06-15 20:58:10 +0800
commit747c0db7910414d2797e38b5a00efbdb0c5ee6a1 (patch)
treef003595d63aa2f5b7191e4587bc770f99d760c3a /smelt
parent2da6a4aec9a249417a9e4c0106ab6bec0489a36f (diff)
downloadSMELT-747c0db7910414d2797e38b5a00efbdb0c5ee6a1.tar.xz
Basic CMake support
Diffstat (limited to 'smelt')
-rw-r--r--smelt/glfw/CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/smelt/glfw/CMakeLists.txt b/smelt/glfw/CMakeLists.txt
new file mode 100644
index 0000000..6785ca1
--- /dev/null
+++ b/smelt/glfw/CMakeLists.txt
@@ -0,0 +1,30 @@
+option(BUILD_DUMB "Disable sound support" OFF)
+
+find_package(PkgConfig REQUIRED)
+find_package(GLEW REQUIRED)
+find_package(OpenAL REQUIRED)
+
+pkg_search_module(GLFW REQUIRED glfw3)
+
+set (SMELT_GLFW_CPP_FILES
+ gfx_glfw.cpp
+ sfx_oal.cpp
+ inp_glfw.cpp
+ sys_glfw.cpp
+)
+
+include_directories(
+ ${GLFW_INCLUDE_DIRS}
+ ${GLEW_INCLUDE_DIRS}
+)
+
+add_library(smelt STATIC ${SMELT_GLFW_CPP_FILES})
+
+if (BUILD_DUMB)
+ message (STATUS "")
+ message (STATUS "BUILD_DUMB build option enabled")
+ message (STATUS "")
+ target_compile_definitions(smelt PRIVATE
+ ENABLE_DUMB
+ )
+endif ()