Commit 52fb53ca authored by Paul Asmuth's avatar Paul Asmuth
Browse files

fix build

parent 5387aafa
Loading
Loading
Loading
Loading
+46 −46
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ enable_testing()

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/extra/cmake")
set(CMAKE_CXX_STANDARD 17)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/core)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

find_package(Threads)
@@ -16,69 +16,69 @@ include_directories(${CAIRO_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS} ${HARFBUZZ_IN

add_definitions(-DFNORDMETRIC_VERSION="unstable")

add_library(plotfx STATIC
    core/plist/plist.cc
    core/plist/plist_parser.cc
    graphics/path.cc
    graphics/brush.cc
    graphics/colour.cc
    graphics/image.cc
    graphics/layer.cc
    graphics/text.cc
    graphics/text_layout.cc
    graphics/text_shaper.cc
    graphics/rasterize.cc
    graphics/png.cc
    elements/element_factory.cc
    elements/element_tree.cc
    elements/plot/gridlines.cc
    elements/plot/plot_axis.cc
    elements/plot/plot_domain.cc
    elements/plot/plot_element.cc
    elements/plot/legenddefinition.cc
    elements/plot/series.cc
    utils/random.cc
    utils/bufferutil.cc
    utils/exception.cc
    utils/UnixTime.cc
    utils/inspect.cc
    utils/stringutil.cc
    utils/duration.cc
    utils/CivilTime.cc
    utils/buffer.cc
    utils/fileutil.cc
    utils/file.cc
    utils/outputstream.cc
    utils/inputstream.cc
    utils/flagparser.cc
    utils/ISO8601.cc
    utils/UTF8.cc
    utils/wallclock.cc
add_library(plotfxlib STATIC
    charts/gridlines.cc
    charts/plot_axis.cc
    charts/plot_domain.cc
    charts/plot_element.cc
    charts/legenddefinition.cc
    charts/series.cc
    common/plist/plist.cc
    common/plist/plist_parser.cc
    common/graphics/path.cc
    common/graphics/brush.cc
    common/graphics/colour.cc
    common/graphics/image.cc
    common/graphics/layer.cc
    common/graphics/text.cc
    common/graphics/text_layout.cc
    common/graphics/text_shaper.cc
    common/graphics/rasterize.cc
    common/graphics/png.cc
    common/element_factory.cc
    common/element_tree.cc
    common/utils/random.cc
    common/utils/bufferutil.cc
    common/utils/exception.cc
    common/utils/UnixTime.cc
    common/utils/inspect.cc
    common/utils/stringutil.cc
    common/utils/duration.cc
    common/utils/CivilTime.cc
    common/utils/buffer.cc
    common/utils/fileutil.cc
    common/utils/file.cc
    common/utils/outputstream.cc
    common/utils/inputstream.cc
    common/utils/flagparser.cc
    common/utils/ISO8601.cc
    common/utils/UTF8.cc
    common/utils/wallclock.cc
    plotfx_cmd.cc)

set(SIGNALTK_LDFLAGS plotfx ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES} ${HARFBUZZ_LIBRARIES} ${HARFBUZZ_ICU_LIBRARIES} ${PNG_LIBRARIES})
set(PLOTFX_LDFLAGS plotfxlib ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES} ${HARFBUZZ_LIBRARIES} ${HARFBUZZ_ICU_LIBRARIES} ${PNG_LIBRARIES})

add_executable(plotfx platform/plotfx_cli.cc)
target_link_libraries(plotfx ${SIGNALTK_LDFLAGS})
add_executable(plotfx common/platform/plotfx_cli.cc)
target_link_libraries(plotfx ${PLOTFX_LDFLAGS})

file(GLOB unit_test_files "testing/**/test_*.cc")
file(GLOB unit_test_files "tests/**/test_*.cc")
foreach(unit_test_path ${unit_test_files})
  get_filename_component(unit_test_name ${unit_test_path} NAME_WE)
  get_filename_component(unit_test_srcdir ${unit_test_path} DIRECTORY)

  add_executable(${unit_test_name} ${unit_test_path})
  target_link_libraries(${unit_test_name} ${SIGNALTK_LDFLAGS})
  target_link_libraries(${unit_test_name} ${PLOTFX_LDFLAGS})

  add_test(
      NAME ${unit_test_name}
      COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${unit_test_name})
endforeach()

file(GLOB spec_test_files "testing/**/test_*.spec")
file(GLOB spec_test_files "tests/**/test_*.spec")
foreach(spec_test_path ${spec_test_files})
  get_filename_component(spec_test_name ${spec_test_path} NAME_WE)
  get_filename_component(spec_test_srcdir ${spec_test_path} DIRECTORY)
  add_test(
      NAME ${spec_test_name}
      COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testing/test_runner.sh ${CMAKE_CURRENT_BINARY_DIR}/plotfx ${spec_test_path} ${CMAKE_CURRENT_BINARY_DIR}/${spec_test_name}.png ${spec_test_srcdir}/${spec_test_name}.png)
      COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_runner.sh ${CMAKE_CURRENT_BINARY_DIR}/plotfx ${spec_test_path} ${CMAKE_CURRENT_BINARY_DIR}/${spec_test_name}.png ${spec_test_srcdir}/${spec_test_name}.png)
endforeach()
+2 −2
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@
 */
#include <iostream>
#include <graphics/layer.h>
#include <elements/plot/axes.h>
#include <elements/plot/gridlines.h>
#include <charts/axes.h>
#include <charts/gridlines.h>
#include <utils/flagparser.h>
#include "plot_api.h"

+2 −2
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@
 */
#include "plot_axis.h"
#include <assert.h>
#include <elements/plot/plot_element.h>
#include <core/config_helpers.h>
#include <charts/plot_element.h>
#include <common/config_helpers.h>
#include <graphics/text.h>
#include <graphics/brush.h>

+2 −2
Original line number Diff line number Diff line
@@ -27,8 +27,8 @@
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "elements/plot/plot_element.h"
#include "core/config_helpers.h"
#include "charts/plot_element.h"
#include "common/config_helpers.h"

namespace plotfx {

+2 −2
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@
#pragma once
#include <memory>
#include "plotfx.h"
#include "core/plist/plist.h"
#include "elements/element.h"
#include "plist/plist.h"
#include "common/element.h"
#include "utils/return_code.h"
#include "plot_axis.h"
#include "plot_domain.h"
Loading