From: Thomas Geymayer Date: Sun, 4 Nov 2012 19:00:53 +0000 (+0100) Subject: Include ShivaVG into libSimGearScene X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2d039e393a0e8a027f8817b2954add1c464bd8ee;p=simgear.git Include ShivaVG into libSimGearScene --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 25f73047..4ab12878 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,11 +185,17 @@ else() add_definitions(-DHAVE_EXPAT_CONFIG_H) endif(SYSTEM_EXPAT) +check_include_file(inttypes.h HAVE_INTTYPES_H) check_include_file(sys/time.h HAVE_SYS_TIME_H) check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H) check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(windows.h HAVE_WINDOWS_H) +if(HAVE_INTTYPES_H) + # ShivaVG needs inttypes.h + add_definitions(-DHAVE_INTTYPES_H) +endif() + if(ENABLE_RTI) # See if we have any rti library variant installed message(STATUS "RTI: ENABLED") diff --git a/simgear/canvas/ShivaVG/src/CMakeLists.txt b/simgear/canvas/ShivaVG/src/CMakeLists.txt index 7b9bc785..1e36635c 100644 --- a/simgear/canvas/ShivaVG/src/CMakeLists.txt +++ b/simgear/canvas/ShivaVG/src/CMakeLists.txt @@ -1,20 +1,8 @@ -include(CheckIncludeFile) -check_include_file("inttypes.h" HAVE_INTTYPES_H) +include(SimGearComponent) -if(HAVE_INTTYPES_H) - add_definitions(-DHAVE_INTTYPES_H) -endif() -add_definitions(-DVG_API_EXPORT) +#add_definitions(-DVG_API_EXPORT) -INCLUDE_DIRECTORIES( - ${OPENGL_INCLUDE_DIR} - ../include -) - -SET(INCROOT ../include/VG) -SET(SRCROOT .) - -SET(ShivaVG_Src +set(ShivaVG_Src ${SRCROOT}/shArrays.c ${SRCROOT}/shArrays.h ${SRCROOT}/shContext.c @@ -36,17 +24,4 @@ SET(ShivaVG_Src ${SRCROOT}/shVgu.c ) -ADD_LIBRARY( - ShivaVG - ${ShivaVG_Src} -) - -TARGET_LINK_LIBRARIES( - ShivaVG - ${OPENGL_gl_LIBRARY} - ${OPENGL_glu_LIBRARY} -) - -if(NOT SIMGEAR_HEADLESS) - install(TARGETS ShivaVG ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() \ No newline at end of file +simgear_scene_component(ShivaVG canvas/ShivaVG "${ShivaVG_Src}" "") \ No newline at end of file