Skip to content

Commit

Permalink
Vcpkg: Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Iswenzz committed Sep 16, 2023
1 parent 95a1179 commit 33a5fc9
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 96 deletions.
3 changes: 3 additions & 0 deletions .vcpkg/linux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
file(TO_CMAKE_PATH $ENV{VCPKG_ROOT} VCPKG_ROOT)
set(VCPKG_TARGET_TRIPLET x64-linux)
include(${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
3 changes: 3 additions & 0 deletions .vcpkg/osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
file(TO_CMAKE_PATH $ENV{VCPKG_ROOT} VCPKG_ROOT)
set(VCPKG_TARGET_TRIPLET x64-osx)
include(${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
3 changes: 3 additions & 0 deletions .vcpkg/windows.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
file(TO_CMAKE_PATH $ENV{VCPKG_ROOT} VCPKG_ROOT)
set(VCPKG_TARGET_TRIPLET x64-windows-static)
include(${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ add_definitions(-D_HAS_AUTO_PTR_ETC)
if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
endif()
if(WIN32)
add_definitions(-DWINDOWS -DNOMINMAX)
endif()

option(BUILD_EXAMPLE_PLUGINS "Build example plugins" OFF)
option(OFX_SUPPORTS_OPENGLRENDER "Build with support for GPU rendering (OpenGL/CUDA/Metal/OpenCL)" ON)
Expand All @@ -20,8 +23,8 @@ endif()
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_BINARY_DIR} )

# Conan packages
find_package(EXPAT)
find_package(opengl_system)
find_package(expat CONFIG REQUIRED)
find_package(OpenGL REQUIRED)

# Macros
set(OFX_SUPPORT_SYMBOLS_DIR ${PROJECT_SOURCE_DIR}/symbols)
Expand Down
6 changes: 3 additions & 3 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ foreach(PLUGIN IN LISTS PLUGINS)
set(TGT example-${PLUGIN})
add_ofx_plugin(${TGT} ${PLUGIN})
target_sources(${TGT} PUBLIC ${PLUGIN_SOURCES})
target_link_libraries(${TGT} ${CONAN_LIBS})
target_link_libraries(${TGT})
target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR})
endforeach()

target_link_libraries(example-OpenGL PRIVATE opengl::opengl)
target_link_libraries(example-Custom PRIVATE opengl::opengl)
target_link_libraries(example-OpenGL PRIVATE OpenGL::GL)
target_link_libraries(example-Custom PRIVATE OpenGL::GL)
2 changes: 1 addition & 1 deletion Support/Plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ foreach(PLUGIN IN LISTS PLUGINS)
set(TGT example-${PLUGIN}-support)
add_ofx_plugin(${TGT} ${PLUGIN})
target_sources(${TGT} PUBLIC ${PLUGIN_SOURCES})
target_link_libraries(${TGT} ${CONAN_LIBS} OfxSupport opengl::opengl)
target_link_libraries(${TGT} OfxSupport OpenGL::GL)
target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR} ${OFX_SUPPORT_HEADER_DIR})
endforeach()
2 changes: 1 addition & 1 deletion Support/PropTester/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ file(GLOB_RECURSE PLUGIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
set(TGT example-PropTester)
add_ofx_plugin(${TGT} ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(${TGT} PUBLIC ${PLUGIN_SOURCES})
target_link_libraries(${TGT} ${CONAN_LIBS} OfxSupport opengl::opengl)
target_link_libraries(${TGT} OfxSupport OpenGL::GL)
target_include_directories(${TGT} PUBLIC ${OFX_HEADER_DIR} ${OFX_SUPPORT_HEADER_DIR})
89 changes: 0 additions & 89 deletions conanfile.py

This file was deleted.

7 changes: 7 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg",
"baseline": "4a600e9fea71bd7872080cbb716797e04d30e6d3"
}
}
14 changes: 14 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "openfx",
"version": "1.4.0",
"description": "OpenFX image processing plug-in standard.",
"homepage": "https://github.com/AcademySoftwareFoundation/openfx",
"dependencies": [
"opengl",
"expat"
],
"overrides": [
{ "name": "opengl", "version-string": "2022-12-04#3" },
{ "name": "expat", "version": "2.5.0#3" }
]
}

0 comments on commit 33a5fc9

Please sign in to comment.