2018-09-22 23:29:31 +02:00
|
|
|
project(gds-render)
|
|
|
|
|
2018-05-07 13:27:50 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
2018-05-18 18:47:19 +02:00
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_search_module(GLIB REQUIRED glib-2.0)
|
|
|
|
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
2018-07-11 12:24:15 +02:00
|
|
|
pkg_check_modules(CAIRO REQUIRED cairo)
|
2018-05-18 18:47:19 +02:00
|
|
|
|
|
|
|
add_subdirectory(glade)
|
2018-12-10 23:45:53 +01:00
|
|
|
add_subdirectory(doxygen)
|
2019-03-11 10:36:02 +01:00
|
|
|
add_subdirectory(version)
|
2018-05-18 18:47:19 +02:00
|
|
|
|
2019-03-26 19:57:19 +01:00
|
|
|
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
2018-07-11 12:24:15 +02:00
|
|
|
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
2018-05-18 18:47:19 +02:00
|
|
|
add_definitions(${GLIB2_CFLAGS_OTHER})
|
|
|
|
|
2018-07-19 15:11:18 +02:00
|
|
|
aux_source_directory("widgets" LAYER_SOURCES)
|
2018-05-22 00:00:19 +02:00
|
|
|
aux_source_directory("tree-renderer" RENDERER_SOURCES)
|
2019-03-21 21:24:59 +01:00
|
|
|
aux_source_directory("gds-utils" GDS_SOURCES)
|
2019-03-26 19:57:19 +01:00
|
|
|
aux_source_directory("latex-renderer" LATEX_SOURCES)
|
|
|
|
aux_source_directory("cairo-renderer" CAIRO_SOURCES)
|
|
|
|
aux_source_directory("geometric" GEOMETRIC_SOURCES)
|
2019-03-14 21:30:37 +01:00
|
|
|
aux_source_directory("layer" LAYER_SELECTOR_SOURCES)
|
2019-03-26 19:57:19 +01:00
|
|
|
set(SOURCE "main.c" "command-line.c" "gds-render-gui.c" "external-renderer.c")
|
2018-05-17 21:46:14 +02:00
|
|
|
|
|
|
|
set(SOURCE
|
|
|
|
${SOURCE}
|
2018-05-22 16:17:14 +02:00
|
|
|
${LAYER_SOURCES}
|
2018-05-22 00:00:19 +02:00
|
|
|
${RENDERER_SOURCES}
|
2019-03-21 21:24:59 +01:00
|
|
|
${GDS_SOURCES}
|
2018-05-22 16:17:14 +02:00
|
|
|
${LATEX_SOURCES}
|
2018-07-19 17:49:33 +02:00
|
|
|
${CAIRO_SOURCES}
|
2019-03-26 19:57:19 +01:00
|
|
|
${GEOMETRIC_SOURCES}
|
2019-03-13 20:32:09 +01:00
|
|
|
${LAYER_SELECTOR_SOURCES}
|
2018-05-17 21:46:14 +02:00
|
|
|
)
|
|
|
|
|
2018-06-05 22:51:50 +02:00
|
|
|
add_compile_options(-Wall)
|
2018-05-08 15:00:37 +02:00
|
|
|
|
2018-05-18 18:47:19 +02:00
|
|
|
add_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c)
|
|
|
|
add_dependencies(${PROJECT_NAME} glib-resources)
|
2019-03-11 10:36:02 +01:00
|
|
|
add_dependencies(${PROJECT_NAME} version)
|
2018-05-18 18:47:19 +02:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c PROPERTIES GENERATED 1)
|
2019-03-11 10:36:02 +01:00
|
|
|
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m version ${CMAKE_DL_LIBS})
|
2018-07-25 11:19:15 +02:00
|
|
|
install (TARGETS ${PROJECT_NAME} DESTINATION bin)
|
2018-05-18 18:47:19 +02:00
|
|
|
|
2019-03-14 19:24:17 +01:00
|
|
|
add_custom_target(documentation DEPENDS doxygen)
|