summaryrefslogtreecommitdiff
path: root/quackleio/CMakeLists.txt
blob: d3f1e0a4545d4926182952a5105bb400419af75c (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required (VERSION 3.10)

project (quackleio)

message("-- Configuring libquackleio")

include("${CMAKE_CURRENT_SOURCE_DIR}/../Settings.cmake")

set(QT_VERSION "5" CACHE STRING "Version of Qt (anything past the first digit is ignored)")

if("${QT_VERSION}" MATCHES "^6")
	find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
else()
	find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
endif()

set(QUACKLEIO_SOURCES
	dawgfactory.cpp
	dict.cpp
	dictfactory.cpp
	dictimplementation.cpp
	flexiblealphabet.cpp
	froggetopt.cpp
	gaddagfactory.cpp
	gcgio.cpp
	queenie.cpp
	streamingreporter.cpp
	util.cpp
)

set(QUACKLEIO_HEADERS
	dawgfactory.h
	dict.h
	dictfactory.h
	dictimplementation.h
	flexiblealphabet.h
	froggetopt.h
	gaddagfactory.h
	gcgio.h
	logania.h
	queenie.h
	streamingreporter.h
	util.h
)

add_library(quackleio
	${QUACKLEIO_SOURCES} ${QUACKLEIO_HEADERS}
)
target_include_directories(quackleio PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
if("${QT_VERSION}" MATCHES "^6")
	target_link_libraries(quackleio Qt6::Core)
else()
	target_link_libraries(quackleio Qt5::Core)
endif()