forked from MLaszczewski/FastGFX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
28 lines (21 loc) · 1.26 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
cmake_minimum_required(VERSION 3.3)
project(FastGFX)
include_directories(deps/glm include)
set(SRC_ROOT ./)
aux_source_directory(${SRC_ROOT}src SRC_LIST)
set(SOURCE_FILES ${SRC_LIST})
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g4")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -s DEMANGLE_SUPPORT=1 -s ASSERTIONS=2")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} --bind -s TOTAL_MEMORY=128000000 -g4")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -stdlib=libc++ -O3 -Os")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s DEMANGLE_SUPPORT=1")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s TOTAL_MEMORY=128000000 -Wno-error=unused-command-line-argument")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0 -s ASSERTIONS=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -Wall -Werror -s NO_EXIT_RUNTIME=1")
set(CMAKE_C_COMPILER "emcc")
set(CMAKE_CXX_COMPILER "em++")
add_library(FastGFX STATIC ${SOURCE_FILES})
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/examples )
add_executable(logo.asm.js ${SOURCE_FILES} examples/logo.cpp)
add_executable(logo_blur.asm.js ${SOURCE_FILES} examples/logo_blur.cpp)
add_executable(lines.asm.js ${SOURCE_FILES} examples/lines.cpp)