2016-10-30 19:25:51 +00:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
2016-10-29 23:58:09 +00:00
|
|
|
project(zero-epwing)
|
2018-06-01 21:23:55 +00:00
|
|
|
|
|
|
|
include(ExternalProject)
|
|
|
|
ExternalProject_Add(
|
|
|
|
eb
|
|
|
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/eb
|
|
|
|
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/eb/configure --disable-shared --disable-ebnet --disable-nls
|
|
|
|
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/eb
|
|
|
|
BUILD_COMMAND make
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
)
|
|
|
|
include_directories(eb ${CMAKE_BINARY_DIR})
|
|
|
|
option(JANSSON_EXAMPLES "" OFF)
|
|
|
|
option(JANSSON_BUILD_DOCS "" OFF)
|
|
|
|
option(JANSSON_WITHOUT_TESTS "" ON)
|
|
|
|
add_subdirectory(jansson)
|
|
|
|
link_directories(eb/eb/.libs ${CMAKE_BINARY_DIR}/jansson/lib)
|
2016-12-14 00:57:59 +00:00
|
|
|
add_executable(zero-epwing main.c book.c convert.c hooks.c)
|
2018-06-01 21:23:55 +00:00
|
|
|
add_dependencies(zero-epwing eb jansson)
|
2018-05-22 00:53:41 +00:00
|
|
|
target_link_libraries(zero-epwing libeb.a libz.a libjansson.a)
|
2017-01-30 05:10:24 +00:00
|
|
|
if (WIN32 OR APPLE)
|
2016-12-04 02:36:30 +00:00
|
|
|
target_link_libraries(zero-epwing libiconv.a)
|
2017-01-30 05:10:24 +00:00
|
|
|
endif (WIN32 OR APPLE)
|
2017-02-05 20:30:57 +00:00
|
|
|
target_link_libraries(zero-epwing)
|