Change stb_image into a library target
This commit is contained in:
parent
0c4f136874
commit
4783f21b31
4 changed files with 23 additions and 6 deletions
|
|
@ -34,6 +34,7 @@ add_library(sfizz_editor STATIC EXCLUDE_FROM_ALL
|
||||||
src/editor/EditIds.cpp
|
src/editor/EditIds.cpp
|
||||||
src/editor/Editor.h
|
src/editor/Editor.h
|
||||||
src/editor/Editor.cpp
|
src/editor/Editor.cpp
|
||||||
|
src/editor/EditorLibs.h
|
||||||
src/editor/EditorLibs.cpp
|
src/editor/EditorLibs.cpp
|
||||||
src/editor/EditorController.h
|
src/editor/EditorController.h
|
||||||
src/editor/GUIComponents.h
|
src/editor/GUIComponents.h
|
||||||
|
|
@ -50,7 +51,7 @@ add_library(sfizz_editor STATIC EXCLUDE_FROM_ALL
|
||||||
src/editor/utility/vstgui_after.h
|
src/editor/utility/vstgui_after.h
|
||||||
src/editor/utility/vstgui_before.h)
|
src/editor/utility/vstgui_before.h)
|
||||||
add_library(sfizz::editor ALIAS sfizz_editor)
|
add_library(sfizz::editor ALIAS sfizz_editor)
|
||||||
target_include_directories(sfizz_editor PUBLIC "src" "external")
|
target_include_directories(sfizz_editor PUBLIC "src")
|
||||||
target_link_libraries(sfizz_editor PUBLIC sfizz::messaging sfizz::plugins-common)
|
target_link_libraries(sfizz_editor PUBLIC sfizz::messaging sfizz::plugins-common)
|
||||||
target_link_libraries(sfizz_editor PRIVATE sfizz::vstgui)
|
target_link_libraries(sfizz_editor PRIVATE sfizz::vstgui)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|
@ -71,6 +72,10 @@ add_library(sfizz_colorspaces INTERFACE)
|
||||||
add_library(sfizz::colorspaces ALIAS sfizz_colorspaces)
|
add_library(sfizz::colorspaces ALIAS sfizz_colorspaces)
|
||||||
target_include_directories(sfizz_colorspaces INTERFACE "external/color-spaces")
|
target_include_directories(sfizz_colorspaces INTERFACE "external/color-spaces")
|
||||||
|
|
||||||
|
add_library(sfizz_stb_image INTERFACE)
|
||||||
|
add_library(sfizz::stb_image ALIAS sfizz_stb_image)
|
||||||
|
target_include_directories(sfizz_stb_image INTERFACE "external/stb_image")
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
#
|
#
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
|
|
@ -81,7 +86,7 @@ else()
|
||||||
target_include_directories(sfizz_editor PRIVATE ${sfizz-gio_INCLUDE_DIRS})
|
target_include_directories(sfizz_editor PRIVATE ${sfizz-gio_INCLUDE_DIRS})
|
||||||
target_link_libraries(sfizz_editor PRIVATE ${sfizz-gio_LIBRARIES})
|
target_link_libraries(sfizz_editor PRIVATE ${sfizz-gio_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(sfizz_editor PRIVATE sfizz::colorspaces sfizz::bit_array sfizz::filesystem)
|
target_link_libraries(sfizz_editor PRIVATE sfizz::colorspaces sfizz::stb_image sfizz::bit_array sfizz::filesystem)
|
||||||
|
|
||||||
# layout tool
|
# layout tool
|
||||||
if(NOT CMAKE_CROSSCOMPILING)
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "Editor.h"
|
#include "Editor.h"
|
||||||
#include "EditorController.h"
|
#include "EditorController.h"
|
||||||
|
#include "EditorLibs.h"
|
||||||
#include "EditIds.h"
|
#include "EditIds.h"
|
||||||
#include "GUIComponents.h"
|
#include "GUIComponents.h"
|
||||||
#include "GUIHelpers.h"
|
#include "GUIHelpers.h"
|
||||||
|
|
@ -18,9 +19,6 @@
|
||||||
#include <absl/strings/ascii.h>
|
#include <absl/strings/ascii.h>
|
||||||
#include <absl/strings/numbers.h>
|
#include <absl/strings/numbers.h>
|
||||||
#include <ghc/fs_std.hpp>
|
#include <ghc/fs_std.hpp>
|
||||||
|
|
||||||
#include <stb_image/stb_image.h>
|
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,8 @@
|
||||||
|
// SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
|
// This code is part of the sfizz library and is licensed under a BSD 2-clause
|
||||||
|
// license. You should have receive a LICENSE.md file along with the code.
|
||||||
|
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
|
||||||
|
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
#include <stb_image/stb_image.h>
|
#include "EditorLibs.h"
|
||||||
|
|
|
||||||
8
plugins/editor/src/editor/EditorLibs.h
Normal file
8
plugins/editor/src/editor/EditorLibs.h
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
// SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
|
// This code is part of the sfizz library and is licensed under a BSD 2-clause
|
||||||
|
// license. You should have receive a LICENSE.md file along with the code.
|
||||||
|
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <stb_image.h>
|
||||||
Loading…
Add table
Reference in a new issue