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)
|
|
|
|
|
|
|
|
project(gds-render)
|
|
|
|
|
|
|
|
add_subdirectory(glade)
|
|
|
|
|
2018-05-22 16:17:14 +02:00
|
|
|
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS})
|
2018-05-18 18:47:19 +02:00
|
|
|
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS})
|
|
|
|
add_definitions(${GLIB2_CFLAGS_OTHER})
|
|
|
|
|
2018-05-07 13:27:50 +02:00
|
|
|
|
2018-05-22 16:17:14 +02:00
|
|
|
aux_source_directory("layer-widget" LAYER_SOURCES)
|
2018-05-22 00:00:19 +02:00
|
|
|
aux_source_directory("tree-renderer" RENDERER_SOURCES)
|
2018-05-22 16:17:14 +02:00
|
|
|
aux_source_directory("gds-parser" PARSER_SOURCES)
|
|
|
|
aux_source_directory("latex-output" LATEX_SOURCES)
|
|
|
|
set(SOURCE "main.c" "layer-selector.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}
|
2018-05-22 16:17:14 +02:00
|
|
|
${PARSER_SOURCES}
|
|
|
|
${LATEX_SOURCES}
|
2018-05-17 21:46:14 +02:00
|
|
|
)
|
|
|
|
|
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)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c PROPERTIES GENERATED 1)
|
2018-05-08 15:00:37 +02:00
|
|
|
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} m)
|
2018-05-18 18:47:19 +02:00
|
|
|
|