1
0
mirror of synced 2024-11-24 07:40:17 +01:00

build: Make external plugins build again

This commit is contained in:
WerWolv 2024-02-24 15:06:10 +01:00
parent 9d02379583
commit b2edb0441a
6 changed files with 85 additions and 71 deletions

View File

@ -738,7 +738,7 @@ function(generateSDKDirectory)
endif() endif()
install(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/libimhex DESTINATION "${SDK_PATH}/lib" PATTERN "**/source/*" EXCLUDE) install(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/libimhex DESTINATION "${SDK_PATH}/lib" PATTERN "**/source/*" EXCLUDE)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/external DESTINATION "${SDK_PATH}/lib" PATTERN "**/source/*" EXCLUDE) install(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/external DESTINATION "${SDK_PATH}/lib")
install(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/third_party/imgui DESTINATION "${SDK_PATH}/lib/third_party" PATTERN "**/source/*" EXCLUDE) install(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/third_party/imgui DESTINATION "${SDK_PATH}/lib/third_party" PATTERN "**/source/*" EXCLUDE)
if (NOT USE_SYSTEM_FMT) if (NOT USE_SYSTEM_FMT)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/third_party/fmt DESTINATION "${SDK_PATH}/lib/third_party") install(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/third_party/fmt DESTINATION "${SDK_PATH}/lib/third_party")

View File

@ -4,6 +4,7 @@ project(imgui_color_text_editor)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
if (NOT IMHEX_EXTERNAL_PLUGIN_BUILD)
add_library(imgui_color_text_editor OBJECT add_library(imgui_color_text_editor OBJECT
source/TextEditor.cpp source/TextEditor.cpp
) )
@ -12,6 +13,8 @@ target_include_directories(imgui_color_text_editor PUBLIC
include include
) )
target_link_libraries(imgui_color_text_editor PRIVATE imgui_includes)
endif()
target_include_directories(imgui_all_includes INTERFACE include) target_include_directories(imgui_all_includes INTERFACE include)
target_link_libraries(imgui_color_text_editor PRIVATE imgui_includes)

View File

@ -4,6 +4,7 @@ project(imgui_custom)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
if (NOT IMHEX_EXTERNAL_PLUGIN_BUILD)
add_library(imgui_custom OBJECT add_library(imgui_custom OBJECT
source/imgui_impl_opengl3.cpp source/imgui_impl_opengl3.cpp
source/imgui_impl_glfw.cpp source/imgui_impl_glfw.cpp
@ -14,7 +15,6 @@ target_include_directories(imgui_custom PUBLIC
) )
target_link_libraries(imgui_custom PRIVATE imgui_includes) target_link_libraries(imgui_custom PRIVATE imgui_includes)
target_include_directories(imgui_all_includes INTERFACE include)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
find_package(Freetype REQUIRED) find_package(Freetype REQUIRED)
@ -38,3 +38,6 @@ endif ()
target_include_directories(imgui_custom PUBLIC ${FREETYPE_INCLUDE_DIRS} ${OpenGL_INCLUDE_DIRS}) target_include_directories(imgui_custom PUBLIC ${FREETYPE_INCLUDE_DIRS} ${OpenGL_INCLUDE_DIRS})
target_link_directories(imgui_custom PUBLIC ${FREETYPE_LIBRARY_DIRS} ${OpenGL_LIBRARY_DIRS}) target_link_directories(imgui_custom PUBLIC ${FREETYPE_LIBRARY_DIRS} ${OpenGL_LIBRARY_DIRS})
target_link_libraries(imgui_custom PUBLIC ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES}) target_link_libraries(imgui_custom PUBLIC ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES})
endif()
target_include_directories(imgui_all_includes INTERFACE include)

View File

@ -4,6 +4,7 @@ project(imgui_imgui)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
if (NOT IMHEX_EXTERNAL_PLUGIN_BUILD)
add_library(imgui_imgui OBJECT add_library(imgui_imgui OBJECT
source/imgui.cpp source/imgui.cpp
source/imgui_demo.cpp source/imgui_demo.cpp
@ -19,10 +20,6 @@ target_include_directories(imgui_imgui PUBLIC
include/misc/freetype include/misc/freetype
) )
add_library(imgui_includes INTERFACE)
target_include_directories(imgui_includes INTERFACE include)
target_include_directories(imgui_all_includes INTERFACE include include/misc/freetype)
target_compile_options(imgui_imgui PRIVATE -Wno-unknown-warning-option) target_compile_options(imgui_imgui PRIVATE -Wno-unknown-warning-option)
find_package(Freetype REQUIRED) find_package(Freetype REQUIRED)
@ -30,3 +27,8 @@ find_package(Freetype REQUIRED)
target_include_directories(imgui_imgui PUBLIC ${FREETYPE_INCLUDE_DIRS}) target_include_directories(imgui_imgui PUBLIC ${FREETYPE_INCLUDE_DIRS})
target_link_directories(imgui_imgui PUBLIC ${FREETYPE_LIBRARY_DIRS}) target_link_directories(imgui_imgui PUBLIC ${FREETYPE_LIBRARY_DIRS})
target_link_libraries(imgui_imgui PUBLIC ${FREETYPE_LIBRARIES}) target_link_libraries(imgui_imgui PUBLIC ${FREETYPE_LIBRARIES})
endif()
add_library(imgui_includes INTERFACE)
target_include_directories(imgui_includes INTERFACE include)
target_include_directories(imgui_all_includes INTERFACE include include/misc/freetype)

View File

@ -4,6 +4,7 @@ project(imgui_imnodes)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
if (NOT IMHEX_EXTERNAL_PLUGIN_BUILD)
add_library(imgui_imnodes OBJECT add_library(imgui_imnodes OBJECT
source/imnodes.cpp source/imnodes.cpp
) )
@ -13,4 +14,6 @@ target_include_directories(imgui_imnodes PUBLIC
) )
target_link_libraries(imgui_imnodes PRIVATE imgui_includes) target_link_libraries(imgui_imnodes PRIVATE imgui_includes)
endif()
target_include_directories(imgui_all_includes INTERFACE include) target_include_directories(imgui_all_includes INTERFACE include)

View File

@ -4,6 +4,7 @@ project(imgui_implot)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
if (NOT IMHEX_EXTERNAL_PLUGIN_BUILD)
add_library(imgui_implot OBJECT add_library(imgui_implot OBJECT
source/implot.cpp source/implot.cpp
source/implot_items.cpp source/implot_items.cpp
@ -15,4 +16,6 @@ target_include_directories(imgui_implot PUBLIC
) )
target_link_libraries(imgui_implot PRIVATE imgui_includes) target_link_libraries(imgui_implot PRIVATE imgui_includes)
endif()
target_include_directories(imgui_all_includes INTERFACE include) target_include_directories(imgui_all_includes INTERFACE include)