aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/CMakeLists.txt6
-rw-r--r--demos/graphics/CMakeLists.txt4
-rw-r--r--demos/graphics_experiments/1.cpp79
-rw-r--r--demos/graphics_experiments/2.cpp312
-rw-r--r--demos/graphics_experiments/4.cpp161
-rw-r--r--demos/graphics_experiments/CMakeLists.txt10
-rw-r--r--demos/input_method/CMakeLists.txt6
-rw-r--r--demos/main/CMakeLists.txt8
-rw-r--r--demos/parse/CMakeLists.txt4
-rw-r--r--demos/scroll_view/CMakeLists.txt8
-rw-r--r--demos/svg_path/CMakeLists.txt6
-rw-r--r--src/common/CMakeLists.txt28
-rw-r--r--src/osx/CMakeLists.txt4
-rw-r--r--src/osx/graphics/quartz/CMakeLists.txt6
-rw-r--r--src/osx/gui/CMakeLists.txt4
-rw-r--r--src/parse/CMakeLists.txt6
-rw-r--r--src/platform/CMakeLists.txt6
-rw-r--r--src/platform/bootstrap/CMakeLists.txt10
-rw-r--r--src/platform/graphics/CMakeLists.txt6
-rw-r--r--src/platform/graphics/cairo/CMakeLists.txt6
-rw-r--r--src/platform/gui/CMakeLists.txt6
-rw-r--r--src/theme_builder/CMakeLists.txt2
-rw-r--r--src/toml/CMakeLists.txt6
-rw-r--r--src/ui/CMakeLists.txt6
-rw-r--r--src/win/CMakeLists.txt8
-rw-r--r--src/win/graphics/direct/CMakeLists.txt8
-rw-r--r--src/win/gui/CMakeLists.txt8
-rw-r--r--src/xml/CMakeLists.txt6
-rw-r--r--test/common/CMakeLists.txt14
-rw-r--r--test/platform/CMakeLists.txt10
-rw-r--r--test/toml/CMakeLists.txt10
-rw-r--r--test/win/graphics/direct/CMakeLists.txt10
-rw-r--r--test/xml/CMakeLists.txt10
33 files changed, 109 insertions, 675 deletions
diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt
index f6dd20c3..220fbeae 100644
--- a/demos/CMakeLists.txt
+++ b/demos/CMakeLists.txt
@@ -1,6 +1,6 @@
add_library(cru_demo_base INTERFACE)
-target_link_libraries(cru_demo_base INTERFACE cru_platform_bootstrap)
+target_link_libraries(cru_demo_base INTERFACE CruPlatformBootstrap)
if(WIN32)
add_subdirectory(graphics)
@@ -24,7 +24,3 @@ endif()
add_subdirectory(parse)
-# My computer graphics practice source codes. Needs `dlib` as dependency.
-if (CRU_BUILD_GRAPHICS_EXPERIMENTS)
- add_subdirectory(graphics_experiments)
-endif()
diff --git a/demos/graphics/CMakeLists.txt b/demos/graphics/CMakeLists.txt
index 2ecd88bc..3a249b1d 100644
--- a/demos/graphics/CMakeLists.txt
+++ b/demos/graphics/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_executable(cru_demo_graphics_draw_circle DrawCircle.cpp)
+add_executable(CruDemoGraphicsDrawCircle DrawCircle.cpp)
-target_link_libraries(cru_demo_graphics_draw_circle PRIVATE cru_demo_base)
+target_link_libraries(CruDemoGraphicsDrawCircle PRIVATE cru_demo_base)
diff --git a/demos/graphics_experiments/1.cpp b/demos/graphics_experiments/1.cpp
deleted file mode 100644
index c85387dc..00000000
--- a/demos/graphics_experiments/1.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// Code referred from
-// https://iq.opengenus.org/bresenham-line-drawining-algorithm/
-
-#include "cru/platform/Color.h"
-#include "cru/platform/bootstrap/Bootstrap.h"
-#include "cru/platform/graphics/Factory.h"
-#include "cru/platform/graphics/Painter.h"
-#include "cru/platform/gui/UiApplication.h"
-#include "cru/platform/gui/Window.h"
-
-#include <functional>
-
-void BresenhamDrawLine(int x1, int y1, int x2, int y2,
- const std::function<void(int, int)>& draw_pixel) {
- // calculating range for line between start and end point
- int dx = x2 - x1;
- int dy = y2 - y1;
-
- int x = x1;
- int y = y1;
-
- // this is the case when slope(m) < 1
- if (abs(dx) > abs(dy)) {
- draw_pixel(x, y); // this putpixel is for very first pixel of the line
- int pk = (2 * abs(dy)) - abs(dx);
-
- for (int i = 0; i < abs(dx); i++) {
- x = x + 1;
- if (pk < 0)
- pk = pk + (2 * abs(dy));
- else {
- y = y + 1;
- pk = pk + (2 * abs(dy)) - (2 * abs(dx));
- }
- draw_pixel(x, y);
- }
- } else {
- // this is the case when slope is greater than or equal to 1 i.e: m>=1
- draw_pixel(x, y); // this putpixel is for very first pixel of the line
- int pk = (2 * abs(dx)) - abs(dy);
-
- for (int i = 0; i < abs(dy); i++) {
- y = y + 1;
- if (pk < 0)
- pk = pk + (2 * abs(dx));
- else {
- x = x + 1;
- pk = pk + (2 * abs(dx)) - (2 * abs(dy));
- }
-
- draw_pixel(x, y); // display pixel at coordinate (x, y)
- }
- }
-}
-
-int main() {
- auto application = cru::platform::bootstrap::CreateUiApplication();
- auto window = application->CreateWindow();
-
- auto brush = application->GetGraphicsFactory()->CreateSolidColorBrush(
- cru::platform::colors::black);
-
- window->SetClientSize(cru::platform::Size(400, 200));
-
- window->PaintEvent()->AddHandler([window, &brush](nullptr_t) {
- auto painter = window->BeginPaint();
- auto draw_pixel = [&painter, &brush](int x, int y) {
- painter->FillRectangle({static_cast<float>(x) - 0.5f,
- static_cast<float>(y) - 0.5f, 1.0f, 1.0f},
- brush.get());
- };
- BresenhamDrawLine(50, 50, 100, 200, draw_pixel);
- BresenhamDrawLine(50, 50, 200, 100, draw_pixel);
- });
-
- window->SetVisibility(cru::platform::gui::WindowVisibilityType::Show);
-
- return application->Run();
-}
diff --git a/demos/graphics_experiments/2.cpp b/demos/graphics_experiments/2.cpp
deleted file mode 100644
index 495f8246..00000000
--- a/demos/graphics_experiments/2.cpp
+++ /dev/null
@@ -1,312 +0,0 @@
-// Code referred from
-// https://www.geeksforgeeks.org/scan-line-polygon-filling-using-opengl-c/
-
-#include "cru/platform/Color.h"
-#include "cru/platform/bootstrap/Bootstrap.h"
-#include "cru/platform/graphics/Factory.h"
-#include "cru/platform/graphics/Painter.h"
-#include "cru/platform/gui/UiApplication.h"
-#include "cru/platform/gui/Window.h"
-
-#include <cmath>
-#include <cstdio>
-#include <functional>
-
-#define maxHt 800
-#define maxWd 600
-#define maxVer 10000
-
-// Start from lower left corner
-typedef struct edgebucket {
- int ymax; // max y-coordinate of edge
- float xofymin; // x-coordinate of lowest edge point updated only in aet
- float slopeinverse;
-} EdgeBucket;
-
-typedef struct edgetabletup {
- // the array will give the scanline number
- // The edge table (ET) with edges entries sorted
- // in increasing y and x of the lower end
-
- int countEdgeBucket; // no. of edgebuckets
- EdgeBucket buckets[maxVer];
-} EdgeTableTuple;
-
-EdgeTableTuple EdgeTable[maxHt], ActiveEdgeTuple;
-
-// Scanline Function
-void initEdgeTable() {
- int i;
- for (i = 0; i < maxHt; i++) {
- EdgeTable[i].countEdgeBucket = 0;
- }
-
- ActiveEdgeTuple.countEdgeBucket = 0;
-}
-
-void printTuple(EdgeTableTuple *tup) {
- int j;
-
- if (tup->countEdgeBucket) printf("\nCount %d-----\n", tup->countEdgeBucket);
-
- for (j = 0; j < tup->countEdgeBucket; j++) {
- printf(" %d+%.2f+%.2f", tup->buckets[j].ymax, tup->buckets[j].xofymin,
- tup->buckets[j].slopeinverse);
- }
-}
-
-void printTable() {
- int i, j;
-
- for (i = 0; i < maxHt; i++) {
- if (EdgeTable[i].countEdgeBucket) printf("\nScanline %d", i);
-
- printTuple(&EdgeTable[i]);
- }
-}
-
-/* Function to sort an array using insertion sort*/
-void insertionSort(EdgeTableTuple *ett) {
- int i, j;
- EdgeBucket temp;
-
- for (i = 1; i < ett->countEdgeBucket; i++) {
- temp.ymax = ett->buckets[i].ymax;
- temp.xofymin = ett->buckets[i].xofymin;
- temp.slopeinverse = ett->buckets[i].slopeinverse;
- j = i - 1;
-
- while ((temp.xofymin < ett->buckets[j].xofymin) && (j >= 0)) {
- ett->buckets[j + 1].ymax = ett->buckets[j].ymax;
- ett->buckets[j + 1].xofymin = ett->buckets[j].xofymin;
- ett->buckets[j + 1].slopeinverse = ett->buckets[j].slopeinverse;
- j = j - 1;
- }
- ett->buckets[j + 1].ymax = temp.ymax;
- ett->buckets[j + 1].xofymin = temp.xofymin;
- ett->buckets[j + 1].slopeinverse = temp.slopeinverse;
- }
-}
-
-void storeEdgeInTuple(EdgeTableTuple *receiver, int ym, int xm, float slopInv) {
- // both used for edgetable and active edge table..
- // The edge tuple sorted in increasing ymax and x of the lower end.
- (receiver->buckets[(receiver)->countEdgeBucket]).ymax = ym;
- (receiver->buckets[(receiver)->countEdgeBucket]).xofymin = (float)xm;
- (receiver->buckets[(receiver)->countEdgeBucket]).slopeinverse = slopInv;
-
- // sort the buckets
- insertionSort(receiver);
-
- (receiver->countEdgeBucket)++;
-}
-
-void storeEdgeInTable(int x1, int y1, int x2, int y2) {
- float m, minv;
- int ymaxTS, xwithyminTS, scanline; // ts stands for to store
-
- if (x2 == x1) {
- minv = 0.000000;
- } else {
- m = ((float)(y2 - y1)) / ((float)(x2 - x1));
-
- // horizontal lines are not stored in edge table
- if (y2 == y1) return;
-
- minv = (float)1.0 / m;
- printf("\nSlope string for %d %d & %d %d: %f", x1, y1, x2, y2, minv);
- }
-
- if (y1 > y2) {
- scanline = y2;
- ymaxTS = y1;
- xwithyminTS = x2;
- } else {
- scanline = y1;
- ymaxTS = y2;
- xwithyminTS = x1;
- }
- // the assignment part is done..now storage..
- storeEdgeInTuple(&EdgeTable[scanline], ymaxTS, xwithyminTS, minv);
-}
-
-void removeEdgeByYmax(EdgeTableTuple *Tup, int yy) {
- int i, j;
- for (i = 0; i < Tup->countEdgeBucket; i++) {
- if (Tup->buckets[i].ymax == yy) {
- printf("\nRemoved at %d", yy);
-
- for (j = i; j < Tup->countEdgeBucket - 1; j++) {
- Tup->buckets[j].ymax = Tup->buckets[j + 1].ymax;
- Tup->buckets[j].xofymin = Tup->buckets[j + 1].xofymin;
- Tup->buckets[j].slopeinverse = Tup->buckets[j + 1].slopeinverse;
- }
- Tup->countEdgeBucket--;
- i--;
- }
- }
-}
-
-void updatexbyslopeinv(EdgeTableTuple *Tup) {
- int i;
-
- for (i = 0; i < Tup->countEdgeBucket; i++) {
- (Tup->buckets[i]).xofymin =
- (Tup->buckets[i]).xofymin + (Tup->buckets[i]).slopeinverse;
- }
-}
-
-void ScanlineFill(const std::function<void(float x1, float y1, float x2,
- float y2)> &draw_line) {
- /* Follow the following rules:
- 1. Horizontal edges: Do not include in edge table
- 2. Horizontal edges: Drawn either on the bottom or on the top.
- 3. Vertices: If local max or min, then count twice, else count
- once.
- 4. Either vertices at local minima or at local maxima are drawn.*/
-
- int i, j, x1, ymax1, x2, ymax2, FillFlag = 0, coordCount;
-
- // we will start from scanline 0;
- // Repeat until last scanline:
- for (i = 0; i < maxHt; i++) // 4. Increment y by 1 (next scan line)
- {
- // 1. Move from ET bucket y to the
- // AET those edges whose ymin = y (entering edges)
- for (j = 0; j < EdgeTable[i].countEdgeBucket; j++) {
- storeEdgeInTuple(&ActiveEdgeTuple, EdgeTable[i].buckets[j].ymax,
- EdgeTable[i].buckets[j].xofymin,
- EdgeTable[i].buckets[j].slopeinverse);
- }
- printTuple(&ActiveEdgeTuple);
-
- // 2. Remove from AET those edges for
- // which y=ymax (not involved in next scan line)
- removeEdgeByYmax(&ActiveEdgeTuple, i);
-
- // sort AET (remember: ET is presorted)
- insertionSort(&ActiveEdgeTuple);
-
- printTuple(&ActiveEdgeTuple);
-
- // 3. Fill lines on scan line y by using pairs of x-coords from AET
- j = 0;
- FillFlag = 0;
- coordCount = 0;
- x1 = 0;
- x2 = 0;
- ymax1 = 0;
- ymax2 = 0;
- while (j < ActiveEdgeTuple.countEdgeBucket) {
- if (coordCount % 2 == 0) {
- x1 = (int)(ActiveEdgeTuple.buckets[j].xofymin);
- ymax1 = ActiveEdgeTuple.buckets[j].ymax;
- if (x1 == x2) {
- /* three cases can arrive-
- 1. lines are towards top of the intersection
- 2. lines are towards bottom
- 3. one line is towards top and other is towards bottom
- */
- if (((x1 == ymax1) && (x2 != ymax2)) ||
- ((x1 != ymax1) && (x2 == ymax2))) {
- x2 = x1;
- ymax2 = ymax1;
- }
-
- else {
- coordCount++;
- }
- }
-
- else {
- coordCount++;
- }
- } else {
- x2 = (int)ActiveEdgeTuple.buckets[j].xofymin;
- ymax2 = ActiveEdgeTuple.buckets[j].ymax;
-
- FillFlag = 0;
-
- // checking for intersection...
- if (x1 == x2) {
- /*three cases can arrive-
- 1. lines are towards top of the intersection
- 2. lines are towards bottom
- 3. one line is towards top and other is towards bottom
- */
- if (((x1 == ymax1) && (x2 != ymax2)) ||
- ((x1 != ymax1) && (x2 == ymax2))) {
- x1 = x2;
- ymax1 = ymax2;
- } else {
- coordCount++;
- FillFlag = 1;
- }
- } else {
- coordCount++;
- FillFlag = 1;
- }
-
- if (FillFlag) {
- // drawing actual lines...
-
- draw_line(x1, i, x2, i);
-
- // printf("\nLine drawn from %d,%d to %d,%d",x1,i,x2,i);
- }
- }
-
- j++;
- }
-
- // 5. For each nonvertical edge remaining in AET, update x for new y
- updatexbyslopeinv(&ActiveEdgeTuple);
- }
-
- printf("\nScanline filling complete");
-}
-
-int edges[] = {50, 50, 100, 40, 150, 150, 100, 80, 40, 90, 50, 50};
-
-void drawPolyDino(const std::function<void(float x1, float y1, float x2,
- float y2)> &draw_line) {
- for (int i = 0; i < sizeof(edges) / sizeof(edges[0]) - 3; i += 2) {
- draw_line(edges[i], edges[i + 1], edges[i + 2], edges[i + 3]);
- storeEdgeInTable(edges[i], edges[i + 1], edges[i + 2],
- edges[i + 3]); // storage of edges in edge table.
- }
-}
-
-void drawDino(const std::function<void(float x1, float y1, float x2, float y2)>
- &draw_line) {
- initEdgeTable();
- drawPolyDino(draw_line);
- printf("\nTable");
- printTable();
-
- ScanlineFill(draw_line); // actual calling of scanline filling..
-}
-
-int main(int argc, char **argv) {
- auto application = cru::platform::bootstrap::CreateUiApplication();
- auto window = application->CreateWindow();
-
- auto brush = application->GetGraphicsFactory()->CreateSolidColorBrush(
- cru::platform::colors::black);
-
- window->SetClientSize(cru::platform::Size(400, 200));
-
- window->PaintEvent()->AddHandler([window, &brush](nullptr_t) {
- auto painter = window->BeginPaint();
- auto draw_line = [&painter, &brush](float x1, float y1, float x2,
- float y2) {
- painter->DrawLine({x1, y1}, {x2, y2}, brush.get(), 1);
- };
-
- drawDino(draw_line);
- });
-
- window->SetVisibility(cru::platform::gui::WindowVisibilityType::Show);
-
- return application->Run();
-}
diff --git a/demos/graphics_experiments/4.cpp b/demos/graphics_experiments/4.cpp
deleted file mode 100644
index 60bd2db9..00000000
--- a/demos/graphics_experiments/4.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-#include "cru/platform/GraphicsBase.h"
-#include "cru/platform/bootstrap/Bootstrap.h"
-#include "cru/platform/graphics/Factory.h"
-#include "cru/platform/graphics/Painter.h"
-#include "cru/platform/gui/UiApplication.h"
-#include "cru/platform/gui/Window.h"
-
-#include <dlib/matrix.h>
-#include <dlib/numeric_constants.h>
-#include <cmath>
-
-using cru::platform::Point;
-
-using matrix14 = dlib::matrix<float, 1, 4>;
-using matrix13 = dlib::matrix<float, 1, 3>;
-using matrix44 = dlib::matrix<float, 4, 4>;
-
-matrix44 Identity() {
- matrix44 m;
- m = dlib::identity_matrix<float, 4>();
- return m;
-}
-
-matrix44 T1(float a, float b, float c) {
- auto m = Identity();
-
- m(0, 3) = -a;
- m(1, 3) = -b;
- m(2, 3) = -c;
-
- return m;
-}
-
-matrix44 T2(float theta) {
- auto m = Identity();
-
- m(0, 0) = -std::cos(theta);
- m(0, 2) = -std::sin(theta);
- m(2, 0) = std::sin(theta);
- m(2, 2) = -std::cos(theta);
-
- return m;
-}
-
-matrix44 T3(float phi) {
- auto m = Identity();
-
- m(1, 1) = std::sin(phi);
- m(1, 2) = -std::cos(phi);
- m(2, 1) = std::cos(phi);
- m(2, 2) = std::sin(phi);
-
- return m;
-}
-
-matrix44 T4(float alpha) {
- auto m = Identity();
-
- m(0, 0) = std::cos(alpha);
- m(1, 0) = std::sin(alpha);
- m(0, 1) = -std::sin(alpha);
- m(1, 1) = std::cos(alpha);
-
- return m;
-}
-
-matrix44 T5() {
- auto m = Identity();
-
- m(0, 0) = -1;
-
- return m;
-}
-
-struct Args {
- float a;
- float b;
- float c;
- float theta;
- float phi;
- float alpha;
-};
-
-matrix44 Tv(Args args) {
- return T1(args.a, args.b, args.c) * T2(args.theta) * T3(args.phi) *
- T4(args.alpha) * T5();
-}
-
-matrix14 Transform(matrix14 point, Args args) { return point * Tv(args); }
-
-matrix14 Transform(matrix13 point, Args args) {
- return matrix14{point(0), point(1), point(2), 1} * Tv(args);
-}
-
-Point TransformTo2D(matrix14 point, float d) {
- return Point{point(1), point(2)};
-}
-
-const float length = 100;
-
-matrix13 points[] = {
- {0, 0, 0},
- {length, 0, 0},
- {length, 0, 0},
- {length, length, 0},
- {length, length, 0},
- {0, length, 0},
- {0, length, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, length},
- {length, 0, 0},
- {length, 0, length},
- {length, length, 0},
- {length, length, length},
- {0, length, 0},
- {0, length, length},
- {0, 0, length},
- {length, 0, length},
- {length, 0, length},
- {length, length, length},
- {length, length, length},
- {0, length, length},
- {0, length, length},
- {0, 0, length},
-};
-
-const float pi = static_cast<float>(dlib::pi);
-
-Args args{30, 40, 50, pi / 3.f, pi / 4.f, pi / 5.f};
-
-int main() {
- std::vector<Point> points2d;
-
- for (auto p : points) {
- auto point2d = TransformTo2D(Transform(std::move(p), args), length);
- points2d.push_back(point2d);
- }
-
- auto application = cru::platform::bootstrap::CreateUiApplication();
- auto window = application->CreateWindow();
-
- auto brush = application->GetGraphicsFactory()->CreateSolidColorBrush(
- cru::platform::colors::black);
-
- window->SetClientSize(cru::platform::Size(400, 400));
-
- window->PaintEvent()->AddHandler([window, &brush, points2d](nullptr_t) {
- auto painter = window->BeginPaint();
- painter->PushState();
- painter->ConcatTransform(cru::platform::Matrix::Translation(200, 200));
- for (int i = 0; i < points2d.size(); i += 2) {
- painter->DrawLine(points2d[i], points2d[i + 1], brush.get(), 1.f);
- }
- painter->PopState();
- });
-
- window->SetVisibility(cru::platform::gui::WindowVisibilityType::Show);
-
- return application->Run();
-}
diff --git a/demos/graphics_experiments/CMakeLists.txt b/demos/graphics_experiments/CMakeLists.txt
deleted file mode 100644
index 103d1cc4..00000000
--- a/demos/graphics_experiments/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-add_executable(cru_graphics_experiment_1 1.cpp)
-target_link_libraries(cru_graphics_experiment_1 PRIVATE cru_demo_base)
-
-add_executable(cru_graphics_experiment_2 2.cpp)
-target_link_libraries(cru_graphics_experiment_2 PRIVATE cru_demo_base)
-
-find_package(dlib CONFIG REQUIRED)
-
-add_executable(cru_graphics_experiment_4 4.cpp)
-target_link_libraries(cru_graphics_experiment_4 PRIVATE cru_demo_base dlib::dlib)
diff --git a/demos/input_method/CMakeLists.txt b/demos/input_method/CMakeLists.txt
index 3a290f3a..7c19c4dd 100644
--- a/demos/input_method/CMakeLists.txt
+++ b/demos/input_method/CMakeLists.txt
@@ -1,12 +1,12 @@
-add_executable(demo_input_method main.cpp)
+add_executable(CruDemoInputMethod main.cpp)
if(APPLE)
- set_target_properties(demo_input_method PROPERTIES
+ set_target_properties(CruDemoInputMethod PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_BUNDLE_NAME demo-input-method
MACOSX_BUNDLE_GUI_IDENTIFIER life.crupest.cru.demo-input-method
)
endif()
-target_link_libraries(demo_input_method PRIVATE cru_demo_base)
+target_link_libraries(CruDemoInputMethod PRIVATE cru_demo_base)
diff --git a/demos/main/CMakeLists.txt b/demos/main/CMakeLists.txt
index 37801dad..721ace19 100644
--- a/demos/main/CMakeLists.txt
+++ b/demos/main/CMakeLists.txt
@@ -1,12 +1,12 @@
-add_executable(demo_main main.cpp)
+add_executable(CruDemoMain main.cpp)
if(APPLE)
- set_target_properties(demo_main PROPERTIES
+ set_target_properties(CruDemoMain PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_BUNDLE_NAME demo-main
MACOSX_BUNDLE_GUI_IDENTIFIER life.crupest.cru.demo-main
)
endif()
-target_add_resources(demo_main cru/ui)
-target_link_libraries(demo_main PRIVATE cru_demo_base cru_ui)
+target_add_resources(CruDemoMain cru/ui)
+target_link_libraries(CruDemoMain PRIVATE cru_demo_base CruUi)
diff --git a/demos/parse/CMakeLists.txt b/demos/parse/CMakeLists.txt
index ceaa5c4e..c90b47f8 100644
--- a/demos/parse/CMakeLists.txt
+++ b/demos/parse/CMakeLists.txt
@@ -1,2 +1,2 @@
-add_executable(cru_demo_parse_eliminate_left_recursion EliminateLeftRecursion.cpp)
-target_link_libraries(cru_demo_parse_eliminate_left_recursion PRIVATE cru_parse)
+add_executable(CruDemoParseEliminateLeftRecursion EliminateLeftRecursion.cpp)
+target_link_libraries(CruDemoParseEliminateLeftRecursion PRIVATE CruParse)
diff --git a/demos/scroll_view/CMakeLists.txt b/demos/scroll_view/CMakeLists.txt
index 1871dd9f..0b9196fe 100644
--- a/demos/scroll_view/CMakeLists.txt
+++ b/demos/scroll_view/CMakeLists.txt
@@ -1,12 +1,12 @@
-add_executable(demo_scroll_view main.cpp)
+add_executable(CruDemoScrollView main.cpp)
if(APPLE)
- set_target_properties(demo_scroll_view PROPERTIES
+ set_target_properties(CruDemoScrollView PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_GUI_IDENTIFIER life.crupest.cru.demo-scroll-view
MACOSX_BUNDLE_BUNDLE_NAME demo-scroll-view
)
endif()
-target_add_resources(demo_scroll_view cru/ui)
-target_link_libraries(demo_scroll_view PRIVATE cru_demo_base cru_ui)
+target_add_resources(CruDemoScrollView cru/ui)
+target_link_libraries(CruDemoScrollView PRIVATE cru_demo_base CruUi)
diff --git a/demos/svg_path/CMakeLists.txt b/demos/svg_path/CMakeLists.txt
index 8e37227b..5488c6b0 100644
--- a/demos/svg_path/CMakeLists.txt
+++ b/demos/svg_path/CMakeLists.txt
@@ -1,12 +1,12 @@
-add_executable(cru_demo_svg_path main.cpp)
+add_executable(CruDemoSvgPath main.cpp)
if(APPLE)
- set_target_properties(cru_demo_svg_path PROPERTIES
+ set_target_properties(CruDemoSvgPath PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_BUNDLE_NAME cru-demo-svg-path
MACOSX_BUNDLE_GUI_IDENTIFIER life.crupest.demo-svg-path
)
endif()
-target_link_libraries(cru_demo_svg_path PRIVATE cru_demo_base)
+target_link_libraries(CruDemoSvgPath PRIVATE cru_demo_base)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 75b91838..38af768a 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(cru_base SHARED
+add_library(CruBase SHARED
Base.cpp
Exception.cpp
Format.cpp
@@ -13,33 +13,33 @@ add_library(cru_base SHARED
log/StdioLogTarget.cpp
platform/Exception.cpp
)
-target_compile_definitions(cru_base PRIVATE CRU_BASE_EXPORT_API)
-target_include_directories(cru_base PUBLIC ${CRU_INCLUDE_DIR})
-target_compile_definitions(cru_base PUBLIC $<$<CONFIG:Debug>:CRU_DEBUG>)
+target_compile_definitions(CruBase PRIVATE CRU_BASE_EXPORT_API)
+target_include_directories(CruBase PUBLIC ${CRU_INCLUDE_DIR})
+target_compile_definitions(CruBase PUBLIC $<$<CONFIG:Debug>:CRU_DEBUG>)
if (UNIX)
- target_sources(cru_base PRIVATE
+ target_sources(CruBase PRIVATE
platform/unix/ErrnoException.cpp
platform/unix/UnixFileStream.cpp
)
if (NOT APPLE)
- target_link_libraries(cru_base PUBLIC pthread)
+ target_link_libraries(CruBase PUBLIC pthread)
endif()
endif()
if (APPLE)
find_library(CORE_FOUNDATION CoreFoundation REQUIRED)
- target_link_libraries(cru_base PUBLIC ${CORE_FOUNDATION})
+ target_link_libraries(CruBase PUBLIC ${CORE_FOUNDATION})
- target_sources(cru_base PRIVATE
+ target_sources(CruBase PRIVATE
platform/osx/Convert.cpp
platform/osx/Exception.cpp
)
endif()
if (WIN32)
- target_sources(cru_base PRIVATE
+ target_sources(CruBase PRIVATE
platform/win/BridgeComStream.cpp
platform/win/ComAutoInit.cpp
platform/win/DebugLogTarget.cpp
@@ -48,15 +48,15 @@ if (WIN32)
platform/win/Win32FileStream.cpp
)
- target_link_libraries(cru_base PUBLIC Shlwapi.lib)
+ target_link_libraries(CruBase PUBLIC Shlwapi.lib)
endif()
if (WIN32)
- target_compile_definitions(cru_base PUBLIC CRU_PLATFORM_WINDOWS)
+ target_compile_definitions(CruBase PUBLIC CRU_PLATFORM_WINDOWS)
elseif(APPLE)
- target_compile_definitions(cru_base PUBLIC CRU_PLATFORM_OSX)
+ target_compile_definitions(CruBase PUBLIC CRU_PLATFORM_OSX)
else()
- target_compile_definitions(cru_base PUBLIC CRU_PLATFORM_LINUX)
+ target_compile_definitions(CruBase PUBLIC CRU_PLATFORM_LINUX)
endif()
-target_link_libraries(cru_base PUBLIC GSL double-conversion)
+target_link_libraries(CruBase PUBLIC GSL double-conversion)
diff --git a/src/osx/CMakeLists.txt b/src/osx/CMakeLists.txt
index ad591478..0a8bb7af 100644
--- a/src/osx/CMakeLists.txt
+++ b/src/osx/CMakeLists.txt
@@ -1,11 +1,11 @@
-add_library(cru_osx_base SHARED
+add_library(CruPlatformBaseOsx SHARED
Resource.cpp
)
find_library(FOUNDATION Foundation REQUIRED)
find_library(CORE_FOUNDATION CoreFoundation REQUIRED)
-target_link_libraries(cru_osx_base PUBLIC cru_platform_base ${FOUNDATION} ${CORE_FOUNDATION})
+target_link_libraries(CruPlatformBaseOsx PUBLIC CruPlatformBase ${FOUNDATION} ${CORE_FOUNDATION})
add_subdirectory(graphics)
add_subdirectory(gui)
diff --git a/src/osx/graphics/quartz/CMakeLists.txt b/src/osx/graphics/quartz/CMakeLists.txt
index 0f44fecf..1fcaff26 100644
--- a/src/osx/graphics/quartz/CMakeLists.txt
+++ b/src/osx/graphics/quartz/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(cru_osx_graphics_quartz SHARED
+add_library(CruPlatformGraphicsQuartz SHARED
Brush.cpp
Convert.cpp
Factory.cpp
@@ -15,5 +15,5 @@ find_library(CORE_GRAPHICS CoreGraphics REQUIRED)
find_library(CORE_TEXT CoreText REQUIRED)
find_library(IMAGE_IO ImageIO REQUIRED)
-target_link_libraries(cru_osx_graphics_quartz PUBLIC ${CORE_GRAPHICS} ${CORE_TEXT} ${IMAGE_IO})
-target_link_libraries(cru_osx_graphics_quartz PUBLIC cru_osx_base cru_platform_graphics)
+target_link_libraries(CruPlatformGraphicsQuartz PUBLIC ${CORE_GRAPHICS} ${CORE_TEXT} ${IMAGE_IO})
+target_link_libraries(CruPlatformGraphicsQuartz PUBLIC CruPlatformBaseOsx CruPlatformGraphics)
diff --git a/src/osx/gui/CMakeLists.txt b/src/osx/gui/CMakeLists.txt
index 5da507e1..5442ad15 100644
--- a/src/osx/gui/CMakeLists.txt
+++ b/src/osx/gui/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(cru_osx_gui SHARED
+add_library(CruPlatformGuiOsx SHARED
Clipboard.mm
Cursor.mm
InputMethod.mm
@@ -12,4 +12,4 @@ add_library(cru_osx_gui SHARED
find_library(APPKIT AppKit REQUIRED)
find_library(UNIFORMTYPEIDENTIFIERS UniformTypeIdentifiers REQUIRED)
-target_link_libraries(cru_osx_gui PUBLIC cru_platform_gui cru_osx_graphics_quartz ${APPKIT} ${UNIFORMTYPEIDENTIFIERS})
+target_link_libraries(CruPlatformGuiOsx PUBLIC CruPlatformGui CruPlatformGraphicsQuartz ${APPKIT} ${UNIFORMTYPEIDENTIFIERS})
diff --git a/src/parse/CMakeLists.txt b/src/parse/CMakeLists.txt
index 17b26a3a..c02b3b8b 100644
--- a/src/parse/CMakeLists.txt
+++ b/src/parse/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(cru_parse SHARED
+add_library(CruParse SHARED
Grammar.cpp
Nonterminal.cpp
ParsingAlgorithm.cpp
@@ -13,5 +13,5 @@ add_library(cru_parse SHARED
Token.cpp
TokenType.cpp
)
-target_compile_definitions(cru_parse PRIVATE CRU_PARSE_EXPORT_API)
-target_link_libraries(cru_parse PUBLIC cru_base)
+target_compile_definitions(CruParse PRIVATE CRU_PARSE_EXPORT_API)
+target_link_libraries(CruParse PUBLIC CruBase)
diff --git a/src/platform/CMakeLists.txt b/src/platform/CMakeLists.txt
index c3f62535..00fda1d3 100644
--- a/src/platform/CMakeLists.txt
+++ b/src/platform/CMakeLists.txt
@@ -1,10 +1,10 @@
-add_library(cru_platform_base SHARED
+add_library(CruPlatformBase SHARED
ForDllExport.cpp
Color.cpp
GraphicsBase.cpp
)
-target_link_libraries(cru_platform_base PUBLIC cru_base)
-target_compile_definitions(cru_platform_base PRIVATE CRU_PLATFORM_EXPORT_API)
+target_link_libraries(CruPlatformBase PUBLIC CruBase)
+target_compile_definitions(CruPlatformBase PRIVATE CRU_PLATFORM_EXPORT_API)
add_subdirectory(graphics)
add_subdirectory(gui)
diff --git a/src/platform/bootstrap/CMakeLists.txt b/src/platform/bootstrap/CMakeLists.txt
index 6df73f38..f5d79cca 100644
--- a/src/platform/bootstrap/CMakeLists.txt
+++ b/src/platform/bootstrap/CMakeLists.txt
@@ -1,13 +1,13 @@
-add_library(cru_platform_bootstrap SHARED
+add_library(CruPlatformBootstrap SHARED
Bootstrap.cpp
)
if(WIN32)
- target_link_libraries(cru_platform_bootstrap PUBLIC cru_win_gui)
+ target_link_libraries(CruPlatformBootstrap PUBLIC CruPlatformGuiWin)
elseif(APPLE)
- target_link_libraries(cru_platform_bootstrap PUBLIC cru_osx_gui)
+ target_link_libraries(CruPlatformBootstrap PUBLIC CruPlatformGuiOsx)
else()
- target_link_libraries(cru_platform_bootstrap PUBLIC cru_platform_graphics_cairo)
+ target_link_libraries(CruPlatformBootstrap PUBLIC CruPlatformGraphicsCairo)
endif()
-target_compile_definitions(cru_platform_bootstrap PRIVATE CRU_PLATFORM_BOOTSTRAP_EXPORT_API)
+target_compile_definitions(CruPlatformBootstrap PRIVATE CRU_PLATFORM_BOOTSTRAP_EXPORT_API)
diff --git a/src/platform/graphics/CMakeLists.txt b/src/platform/graphics/CMakeLists.txt
index a92fe0ff..da9bf61c 100644
--- a/src/platform/graphics/CMakeLists.txt
+++ b/src/platform/graphics/CMakeLists.txt
@@ -1,10 +1,10 @@
-add_library(cru_platform_graphics SHARED
+add_library(CruPlatformGraphics SHARED
ForDllExport.cpp
Geometry.cpp
Image.cpp
NullPainter.cpp
)
-target_compile_definitions(cru_platform_graphics PRIVATE CRU_PLATFORM_GRAPHICS_EXPORT_API)
-target_link_libraries(cru_platform_graphics PUBLIC cru_platform_base)
+target_compile_definitions(CruPlatformGraphics PRIVATE CRU_PLATFORM_GRAPHICS_EXPORT_API)
+target_link_libraries(CruPlatformGraphics PUBLIC CruPlatformBase)
add_subdirectory(cairo)
diff --git a/src/platform/graphics/cairo/CMakeLists.txt b/src/platform/graphics/cairo/CMakeLists.txt
index 13f47bcc..f79e1277 100644
--- a/src/platform/graphics/cairo/CMakeLists.txt
+++ b/src/platform/graphics/cairo/CMakeLists.txt
@@ -2,10 +2,10 @@ if (UNIX)
find_library(LIB_CAIRO cairo REQUIRED)
find_library(LIB_PANGO NAMES pango pango-1.0 REQUIRED)
- add_library(cru_platform_graphics_cairo SHARED
+ add_library(CruPlatformGraphicsCairo SHARED
CairoGraphicsFactory.cpp
CairoResource.cpp
)
- target_compile_definitions(cru_platform_graphics_cairo PRIVATE CRU_PLATFORM_GRAPHICS_CAIRO_EXPORT_API)
- target_link_libraries(cru_platform_graphics_cairo PUBLIC cru_platform_graphics PRIVATE ${LIB_CAIRO} ${LIB_PANGO})
+ target_compile_definitions(CruPlatformGraphicsCairo PRIVATE CRU_PLATFORM_GRAPHICS_CAIRO_EXPORT_API)
+ target_link_libraries(CruPlatformGraphicsCairo PUBLIC CruPlatformGraphics PRIVATE ${LIB_CAIRO} ${LIB_PANGO})
endif()
diff --git a/src/platform/gui/CMakeLists.txt b/src/platform/gui/CMakeLists.txt
index bd899ecd..eb7467cd 100644
--- a/src/platform/gui/CMakeLists.txt
+++ b/src/platform/gui/CMakeLists.txt
@@ -1,7 +1,7 @@
-add_library(cru_platform_gui SHARED
+add_library(CruPlatformGui SHARED
Keyboard.cpp
Menu.cpp
UiApplication.cpp
)
-target_link_libraries(cru_platform_gui PUBLIC cru_platform_graphics)
-target_compile_definitions(cru_platform_gui PRIVATE CRU_PLATFORM_GUI_EXPORT_API)
+target_link_libraries(CruPlatformGui PUBLIC CruPlatformGraphics)
+target_compile_definitions(CruPlatformGui PRIVATE CRU_PLATFORM_GUI_EXPORT_API)
diff --git a/src/theme_builder/CMakeLists.txt b/src/theme_builder/CMakeLists.txt
index ed9029f0..656f9f0a 100644
--- a/src/theme_builder/CMakeLists.txt
+++ b/src/theme_builder/CMakeLists.txt
@@ -42,4 +42,4 @@ endif()
target_add_resources(cru_theme_builder cru/ui)
target_add_resources(cru_theme_builder cru/theme_builder)
-target_link_libraries(cru_theme_builder PRIVATE cru_platform_bootstrap cru_ui)
+target_link_libraries(cru_theme_builder PRIVATE CruPlatformBootstrap CruUi)
diff --git a/src/toml/CMakeLists.txt b/src/toml/CMakeLists.txt
index be04ad79..170509a4 100644
--- a/src/toml/CMakeLists.txt
+++ b/src/toml/CMakeLists.txt
@@ -1,6 +1,6 @@
-add_library(cru_toml SHARED
+add_library(CruToml SHARED
TomlDocument.cpp
TomlParser.cpp
)
-target_compile_definitions(cru_toml PRIVATE CRU_TOML_EXPORT_API)
-target_link_libraries(cru_toml PUBLIC cru_base)
+target_compile_definitions(CruToml PRIVATE CRU_TOML_EXPORT_API)
+target_link_libraries(CruToml PUBLIC CruBase)
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index 66b473d2..b3e57dd7 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(cru_ui SHARED
+add_library(CruUi SHARED
DeleteLater.cpp
Helper.cpp
ThemeManager.cpp
@@ -75,5 +75,5 @@ add_library(cru_ui SHARED
style/StyleRule.cpp
style/StyleRuleSet.cpp
)
-target_compile_definitions(cru_ui PRIVATE CRU_UI_EXPORT_API)
-target_link_libraries(cru_ui PUBLIC cru_platform_gui cru_xml)
+target_compile_definitions(CruUi PRIVATE CRU_UI_EXPORT_API)
+target_link_libraries(CruUi PUBLIC CruPlatformGui CruXml)
diff --git a/src/win/CMakeLists.txt b/src/win/CMakeLists.txt
index ff3d6f96..607d8b61 100644
--- a/src/win/CMakeLists.txt
+++ b/src/win/CMakeLists.txt
@@ -1,9 +1,9 @@
-add_library(cru_win_base SHARED
+add_library(CruWinBase SHARED
ForDllExport.cpp
)
-target_compile_definitions(cru_win_base PUBLIC UNICODE _UNICODE) # use unicode
-target_compile_definitions(cru_win_base PRIVATE CRU_WIN_EXPORT_API)
-target_link_libraries(cru_win_base PUBLIC cru_base)
+target_compile_definitions(CruWinBase PUBLIC UNICODE _UNICODE) # use unicode
+target_compile_definitions(CruWinBase PRIVATE CRU_WIN_EXPORT_API)
+target_link_libraries(CruWinBase PUBLIC CruBase)
add_subdirectory(graphics)
add_subdirectory(gui)
diff --git a/src/win/graphics/direct/CMakeLists.txt b/src/win/graphics/direct/CMakeLists.txt
index 39f9802a..a9d5900b 100644
--- a/src/win/graphics/direct/CMakeLists.txt
+++ b/src/win/graphics/direct/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(cru_win_graphics_direct SHARED
+add_library(CruPlatformGraphicsDirect2d SHARED
Brush.cpp
Font.cpp
Geometry.cpp
@@ -11,6 +11,6 @@ add_library(cru_win_graphics_direct SHARED
WindowPainter.cpp
WindowRenderTarget.cpp
)
-target_link_libraries(cru_win_graphics_direct PUBLIC D3D11 D2d1 DWrite)
-target_link_libraries(cru_win_graphics_direct PUBLIC cru_win_base cru_platform_graphics)
-target_compile_definitions(cru_win_graphics_direct PRIVATE CRU_WIN_GRAPHICS_DIRECT_EXPORT_API)
+target_link_libraries(CruPlatformGraphicsDirect2d PUBLIC D3D11 D2d1 DWrite)
+target_link_libraries(CruPlatformGraphicsDirect2d PUBLIC CruWinBase CruPlatformGraphics)
+target_compile_definitions(CruPlatformGraphicsDirect2d PRIVATE CRU_WIN_GRAPHICS_DIRECT_EXPORT_API)
diff --git a/src/win/gui/CMakeLists.txt b/src/win/gui/CMakeLists.txt
index 9e26f190..4a27ffb6 100644
--- a/src/win/gui/CMakeLists.txt
+++ b/src/win/gui/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(cru_win_gui SHARED
+add_library(CruPlatformGuiWin SHARED
Clipboard.cpp
Cursor.cpp
GodWindow.cpp
@@ -11,6 +11,6 @@ add_library(cru_win_gui SHARED
WindowClass.cpp
WindowManager.cpp
)
-target_link_libraries(cru_win_gui PUBLIC imm32)
-target_link_libraries(cru_win_gui PUBLIC cru_win_graphics_direct cru_platform_gui)
-target_compile_definitions(cru_win_gui PRIVATE CRU_WIN_GUI_EXPORT_API)
+target_link_libraries(CruPlatformGuiWin PUBLIC imm32)
+target_link_libraries(CruPlatformGuiWin PUBLIC CruPlatformGraphicsDirect2d CruPlatformGui)
+target_compile_definitions(CruPlatformGuiWin PRIVATE CRU_WIN_GUI_EXPORT_API)
diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt
index 014e820c..519b59f2 100644
--- a/src/xml/CMakeLists.txt
+++ b/src/xml/CMakeLists.txt
@@ -1,6 +1,6 @@
-add_library(cru_xml SHARED
+add_library(CruXml SHARED
XmlNode.cpp
XmlParser.cpp
)
-target_compile_definitions(cru_xml PRIVATE CRU_XML_EXPORT_API)
-target_link_libraries(cru_xml PUBLIC cru_base)
+target_compile_definitions(CruXml PRIVATE CRU_XML_EXPORT_API)
+target_link_libraries(CruXml PUBLIC CruBase)
diff --git a/test/common/CMakeLists.txt b/test/common/CMakeLists.txt
index 18f69e32..17cfa85b 100644
--- a/test/common/CMakeLists.txt
+++ b/test/common/CMakeLists.txt
@@ -1,28 +1,28 @@
-add_executable(cru_base_test
+add_executable(CruBaseTest
HandlerRegistryTest.cpp
PropertyTreeTest.cpp
StringTest.cpp
StringToNumberConverterTest.cpp
StringUtilTest.cpp
)
-target_link_libraries(cru_base_test PRIVATE cru_base cru_test_base)
+target_link_libraries(CruBaseTest PRIVATE CruBase cru_test_base)
if (UNIX)
- target_sources(cru_base_test PRIVATE
+ target_sources(CruBaseTest PRIVATE
platform/unix/UnixFileStreamTest.cpp
)
endif()
if (WIN32)
- target_sources(cru_base_test PRIVATE
+ target_sources(CruBaseTest PRIVATE
platform/win/StreamConvertTest.cpp
platform/win/Win32FileStreamTest.cpp
)
- add_custom_command(TARGET cru_base_test POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:cru_base_test> $<TARGET_FILE_DIR:cru_base_test>
+ add_custom_command(TARGET CruBaseTest POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:CruBaseTest> $<TARGET_FILE_DIR:CruBaseTest>
COMMAND_EXPAND_LISTS
)
endif()
-catch_discover_tests(cru_base_test)
+catch_discover_tests(CruBaseTest)
diff --git a/test/platform/CMakeLists.txt b/test/platform/CMakeLists.txt
index 014e88fe..37bd7e4a 100644
--- a/test/platform/CMakeLists.txt
+++ b/test/platform/CMakeLists.txt
@@ -1,14 +1,14 @@
-add_executable(cru_platform_base_test
+add_executable(CruPlatformBaseTest
ColorTest.cpp
MatrixTest.cpp
)
-target_link_libraries(cru_platform_base_test PRIVATE cru_platform_base cru_test_base)
+target_link_libraries(CruPlatformBaseTest PRIVATE CruPlatformBase cru_test_base)
if (WIN32)
- add_custom_command(TARGET cru_platform_base_test POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:cru_platform_base_test> $<TARGET_FILE_DIR:cru_platform_base_test>
+ add_custom_command(TARGET CruPlatformBaseTest POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:CruPlatformBaseTest> $<TARGET_FILE_DIR:CruPlatformBaseTest>
COMMAND_EXPAND_LISTS
)
endif()
-catch_discover_tests(cru_platform_base_test)
+catch_discover_tests(CruPlatformBaseTest)
diff --git a/test/toml/CMakeLists.txt b/test/toml/CMakeLists.txt
index c80355ed..03f81047 100644
--- a/test/toml/CMakeLists.txt
+++ b/test/toml/CMakeLists.txt
@@ -1,13 +1,13 @@
-add_executable(cru_toml_test
+add_executable(CruTomlTest
ParserTest.cpp
)
-target_link_libraries(cru_toml_test PRIVATE cru_toml cru_test_base)
+target_link_libraries(CruTomlTest PRIVATE CruToml cru_test_base)
if (WIN32)
- add_custom_command(TARGET cru_toml_test POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:cru_toml_test> $<TARGET_FILE_DIR:cru_toml_test>
+ add_custom_command(TARGET CruTomlTest POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:CruTomlTest> $<TARGET_FILE_DIR:CruTomlTest>
COMMAND_EXPAND_LISTS
)
endif()
-catch_discover_tests(cru_toml_test)
+catch_discover_tests(CruTomlTest)
diff --git a/test/win/graphics/direct/CMakeLists.txt b/test/win/graphics/direct/CMakeLists.txt
index 01320312..2137f1bd 100644
--- a/test/win/graphics/direct/CMakeLists.txt
+++ b/test/win/graphics/direct/CMakeLists.txt
@@ -1,13 +1,13 @@
-add_executable(cru_win_graphics_direct_test
+add_executable(CruPlatformGraphicsDirect2d_test
ConvertTest.cpp
)
-target_link_libraries(cru_win_graphics_direct_test PRIVATE cru_win_graphics_direct cru_test_base)
+target_link_libraries(CruPlatformGraphicsDirect2d_test PRIVATE CruPlatformGraphicsDirect2d cru_test_base)
if (WIN32)
- add_custom_command(TARGET cru_win_graphics_direct_test POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:cru_win_graphics_direct_test> $<TARGET_FILE_DIR:cru_win_graphics_direct_test>
+ add_custom_command(TARGET CruPlatformGraphicsDirect2d_test POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:CruPlatformGraphicsDirect2d_test> $<TARGET_FILE_DIR:CruPlatformGraphicsDirect2d_test>
COMMAND_EXPAND_LISTS
)
endif()
-catch_discover_tests(cru_win_graphics_direct_test)
+catch_discover_tests(CruPlatformGraphicsDirect2d_test)
diff --git a/test/xml/CMakeLists.txt b/test/xml/CMakeLists.txt
index 64f8eab3..73838a35 100644
--- a/test/xml/CMakeLists.txt
+++ b/test/xml/CMakeLists.txt
@@ -1,13 +1,13 @@
-add_executable(cru_xml_test
+add_executable(CruXmlTest
ParserTest.cpp
)
-target_link_libraries(cru_xml_test PRIVATE cru_xml cru_test_base)
+target_link_libraries(CruXmlTest PRIVATE CruXml cru_test_base)
if (WIN32)
- add_custom_command(TARGET cru_xml_test POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:cru_xml_test> $<TARGET_FILE_DIR:cru_xml_test>
+ add_custom_command(TARGET CruXmlTest POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:CruXmlTest> $<TARGET_FILE_DIR:CruXmlTest>
COMMAND_EXPAND_LISTS
)
endif()
-catch_discover_tests(cru_xml_test)
+catch_discover_tests(CruXmlTest)