-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (30 loc) · 996 Bytes
/
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
29
30
31
32
33
34
35
36
37
#
# Copyright © 2016 Wan Wai Ho <[email protected]>
#
# This file is subject to the terms and conditions of the Library GNU
# General Public License. See the file COPYING in the main directory
# of the libepubpacker distribution for more details.
#
cmake_minimum_required(VERSION 3.5)
project(libepubpacker VERSION 0.1)
find_package(Boost REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(GTest REQUIRED)
set(CMAKE_CXX_STANDARD 14)
include_directories(
${LIBXML2_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
file(GLOB XML_LIB_FILES xml/*.hh xml/*.cc)
file(GLOB UTIL_LIB_FILES util/*.hh util/*.cc)
file(GLOB EPUB_LIB_FILES epub/*.hh epub/*.cc)
add_library(epubpacker
${EPUB_LIB_FILES}
${XML_LIB_FILES}
${UTIL_LIB_FILES}
)
target_link_libraries(epubpacker ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES})
file(GLOB TEST_FILES test/*.cc)
add_executable(epub_ut ${TEST_FILES})
target_link_libraries(epub_ut epubpacker ${GTEST_MAIN_LIBRARY} ${GTEST_LIBRARIES})