summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: dc5807ab65c8424e9b672a20e8f09f5ad27371b6 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.2)
project(honey_engine_demo)

set(CMAKE_C_FLAGS "-Wall -Wextra -Werror -Wfatal-errors -Wpedantic")

find_package(OpenGL REQUIRED)
find_package(Lua51 REQUIRED)

include_directories(${LUA_INCLUDE_DIR})

set(CMAKE_C_FLAGS "-g")

add_library(glad src/glad/glad.c)
add_library(stb_image src/stb_image/stb_image.c)

set(SOURCE_FILES
  src/main.c
  src/glm_bindings.c
  src/glm_vec3_bindings.c
  src/glm_vec4_bindings.c
  src/glm_mat3_bindings.c
  src/glm_mat4_bindings.c
  src/honey.c
  src/input.c
  src/honey_lua.c
  src/mesh.c
  src/shader.c
  src/texture.c
  src/window.c)
  
add_executable(honey ${SOURCE_FILES})
if (WIN32)
  set(LIBRARIES ${LUA_LIBRARIES} assimp glfw3 opengl32 glad stb_image m)
else()
  set(LIBRARIES ${LUA_LIBRARIES} assimp glfw GL glad stb_image dl m)
endif()
target_link_libraries(honey ${LIBRARIES})