Add preview rendering skeleton
This commit is contained in:
parent
8b1f667819
commit
f42d61192a
@ -1,3 +1,7 @@
|
|||||||
|
if (POLICY CMP0048)
|
||||||
|
cmake_policy(SET CMP0048 NEW)
|
||||||
|
endif (POLICY CMP0048)
|
||||||
|
|
||||||
project(gds-render LANGUAGES C)
|
project(gds-render LANGUAGES C)
|
||||||
|
|
||||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
@ -24,7 +28,7 @@ if(NOT WIN32)
|
|||||||
set(BoldWhite "${Esc}[1;37m")
|
set(BoldWhite "${Esc}[1;37m")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_search_module(GLIB REQUIRED glib-2.0)
|
pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||||
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
||||||
@ -81,6 +85,12 @@ set(FORT_ENABLE_TESTING OFF CACHE INTERNAL "")
|
|||||||
|
|
||||||
add_subdirectory(3rdparty/libfort)
|
add_subdirectory(3rdparty/libfort)
|
||||||
|
|
||||||
|
if(OPENGL_PREVIEW)
|
||||||
|
message("${Green}OpenGL preview activated${ColorReset}")
|
||||||
|
add_definitions(-DGDS_RENDER_OPGENGL_PREVIEW)
|
||||||
|
add_subdirectory(preview-rendering)
|
||||||
|
endif(OPENGL_PREVIEW)
|
||||||
|
|
||||||
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
||||||
add_definitions(${GLIB2_CFLAGS_OTHER})
|
add_definitions(${GLIB2_CFLAGS_OTHER})
|
||||||
|
|
||||||
@ -88,6 +98,10 @@ add_executable(${PROJECT_NAME} ${SOURCE} ${SOURCE_GENERATED})
|
|||||||
add_dependencies(${PROJECT_NAME} glib-resources)
|
add_dependencies(${PROJECT_NAME} glib-resources)
|
||||||
add_dependencies(${PROJECT_NAME} version)
|
add_dependencies(${PROJECT_NAME} version)
|
||||||
add_dependencies(${PROJECT_NAME} translations)
|
add_dependencies(${PROJECT_NAME} translations)
|
||||||
|
if(OPENGL_PREVIEW)
|
||||||
|
add_dependencies(${PROJECT_NAME} opengl-preview)
|
||||||
|
target_link_libraries(${PROJECT_NAME} opengl-preview)
|
||||||
|
endif(OPENGL_PREVIEW)
|
||||||
|
|
||||||
install (TARGETS ${PROJECT_NAME}
|
install (TARGETS ${PROJECT_NAME}
|
||||||
RUNTIME
|
RUNTIME
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
add_subdirectory(plugin-example)
|
add_subdirectory(plugin-example)
|
||||||
add_custom_target(plugins DEPENDS pluginexample)
|
add_custom_target(plugins DEPENDS pluginexample)
|
||||||
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
project(pluginexample)
|
project(pluginexample)
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_search_module(PYTHON REQUIRED python3)
|
pkg_search_module(PYTHON REQUIRED python3)
|
||||||
|
|
||||||
|
7
preview-rendering/CMakeLists.txt
Normal file
7
preview-rendering/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
project(opengl-preview)
|
||||||
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
|
aux_source_directory("src" SRCS)
|
||||||
|
|
||||||
|
add_library(${PROJECT_NAME} STATIC ${SRCS})
|
||||||
|
target_include_directories(${PROJECT_NAME} PUBLIC "include")
|
4
preview-rendering/src/preview-rendering.c
Normal file
4
preview-rendering/src/preview-rendering.c
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
int foobar(void)
|
||||||
|
{
|
||||||
|
return 42;
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
project(gds-render-test)
|
project(gds-render-test)
|
||||||
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
add_custom_target(test "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}" "-r compact" "-s" DEPENDS ${PROJECT_NAME})
|
add_custom_target(test "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}" "-r compact" "-s" DEPENDS ${PROJECT_NAME})
|
||||||
|
|
||||||
@ -22,7 +23,6 @@ if(NOT WIN32)
|
|||||||
set(BoldWhite "${Esc}[1;37m")
|
set(BoldWhite "${Esc}[1;37m")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8)
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
|
||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/catch-framework")
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/catch-framework")
|
||||||
|
Loading…
Reference in New Issue
Block a user