aboutsummaryrefslogtreecommitdiff
path: root/smelt/glfw/CMakeLists.txt
blob: 73c213039a1a7ad56117246873a57623d17e68c6 (plain) (blame)
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
40
41
42
43
44
45
option (BUILD_DUMB "Disable sound support" OFF)
option (USE_CXIMAGE "Use CxImage instead of DevIL" OFF)

find_package(glfw3 REQUIRED)
find_package(GLEW REQUIRED)
find_package(OpenAL REQUIRED)

if (NOT USE_CXIMAGE)
	find_package(DevIL REQUIRED)
endif ()

set (SMELT_GLFW_CPP_FILES
	gfx_glfw.cpp
	sfx_oal.cpp
	inp_glfw.cpp
	sys_glfw.cpp
)

include_directories(
	${GLEW_INCLUDE_DIRS}
)

add_library(smelt STATIC ${SMELT_GLFW_CPP_FILES})

target_include_directories(smelt PUBLIC ../../include)

target_link_libraries(smelt glfw)

if (BUILD_DUMB)
	message (STATUS "")
	message (STATUS "BUILD_DUMB build option enabled")
	message (STATUS "")
	target_compile_definitions(smelt PRIVATE
		ENABLE_DUMB
	)
endif ()

if (USE_CXIMAGE)
	message (STATUS "")
	message (STATUS "USE_CXIMAGE build option enabled")
	message (STATUS "")
	target_compile_definitions(smelt PRIVATE
		USE_CXIMAGE
	)
endif ()