summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 15a39d7ad6119faebf0880bfed920e91597db6eb (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
cmake_minimum_required(VERSION 3.5)
project(qicclient)
set(CMAKE_AUTOMOC ON)
find_package(Qt5Core)

set(HDRS
	${PROJECT_NAME}/product.hxx
	${PROJECT_NAME}/catalog.hxx
	${PROJECT_NAME}/client.hxx
	)

if (NOT EMSCRIPTEN)
	set(HDRS
		${HDRS}
		${PROJECT_NAME}/ord.hxx
		${PROJECT_NAME}/member.hxx
		${PROJECT_NAME}/admin.hxx
		)
endif()

set(SRCS
	${HDRS}
	catalog.cxx
	client.cxx
	)

if (NOT EMSCRIPTEN)
	set(SRCS
		${SRCS}
		ord.cxx
		member.cxx
		admin.cxx
		)
endif()

if (EMSCRIPTEN OR IOS)
	add_library(${PROJECT_NAME} STATIC ${SRCS})
else()
	add_library(${PROJECT_NAME} SHARED ${SRCS})
endif()

target_link_libraries(${PROJECT_NAME}
	Qt5::Core
	icclient
	)

target_compile_definitions(${PROJECT_NAME} PRIVATE QICCLIENT)
install(TARGETS ${PROJECT_NAME} DESTINATION lib)
install(FILES ${HDRS} DESTINATION include/${PROJECT_NAME})