2015-11-03 11:46:05 +00:00
|
|
|
cmake_minimum_required (VERSION 3.0)
|
2015-11-04 04:13:34 +00:00
|
|
|
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
|
|
|
|
2015-11-07 13:04:44 +00:00
|
|
|
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "build")
|
2015-11-17 06:35:30 +00:00
|
|
|
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "build")
|
2015-11-07 13:04:44 +00:00
|
|
|
|
2015-11-03 11:46:05 +00:00
|
|
|
project (Matabstrix)
|
|
|
|
add_definitions ("-std=c++14 -Wall -Wextra")
|
2015-11-16 15:55:16 +00:00
|
|
|
set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "--embed-file data -s TOTAL_MEMORY=67108864")
|
2015-11-04 04:13:34 +00:00
|
|
|
|
2015-11-17 06:35:30 +00:00
|
|
|
file (GLOB_RECURSE sources "src/**.cpp")
|
|
|
|
file (GLOB_RECURSE examples "examples/**.cpp")
|
2015-11-04 04:13:34 +00:00
|
|
|
|
2015-11-17 06:35:30 +00:00
|
|
|
add_library (matabstrix STATIC ${sources})
|
|
|
|
|
|
|
|
add_executable (example ${examples})
|
2015-11-03 14:50:08 +00:00
|
|
|
set (CMAKE_EXECUTABLE_SUFFIX ".html")
|
2015-11-17 06:35:30 +00:00
|
|
|
set_target_properties (example PROPERTIES OUTPUT_NAME "index")
|
|
|
|
target_link_libraries (example matabstrix)
|
2015-11-04 04:48:27 +00:00
|
|
|
|
|
|
|
find_package (GLM REQUIRED)
|
|
|
|
include_directories (${GLM_INCLUDE_DIRS})
|
2015-11-16 15:55:16 +00:00
|
|
|
|
|
|
|
find_package (STB REQUIRED)
|
|
|
|
include_directories (${STB_INCLUDE_DIRS})
|