Skip to content

Commit

Permalink
[ogre/ogre-next] Add conflict error message (#11325)
Browse files Browse the repository at this point in the history
* [ogre/ogre-next] Add conflict error message

* [ogre] Fix build error

* [ogre/ogre-next] Fix deprecated function
  • Loading branch information
LilyWangL committed May 15, 2020
1 parent 184c724 commit fea5813
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 36 deletions.
2 changes: 1 addition & 1 deletion ports/ogre-next/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: ogre-next
Version: 2019-10-20
Version: 2019-10-20-1
Build-Depends: zlib, freeimage, freetype, rapidjson, openvr, boost-thread, boost-date-time, poco, tbb, sdl2, tinyxml, zziplib
Homepage: https://github.com/OGRECave/ogre-next
Description: Ogre 2.1 & 2.2 - scene-oriented, flexible 3D engine written in C++
Expand Down
8 changes: 5 additions & 3 deletions ports/ogre-next/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This portfile is based (shamelessly copied and adapted a bit) on 'ogre' portfile.

include(vcpkg_common_functions)
if (EXISTS "${CURRENT_INSTALLED_DIR}/Media/HLMS/Blendfunctions_piece_fs.glslt")
message(FATAL_ERROR "FATAL ERROR: ogre-next and ogre are incompatible.")
endif()

if(NOT VCPKG_TARGET_IS_WINDOWS)
message("${PORT} currently requires the following library from the system package manager:\n Xaw\n\nIt can be installed on Ubuntu systems via apt-get install libxaw7-dev")
Expand Down Expand Up @@ -87,7 +89,7 @@ endif()

#Remove OgreMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol
#manual-link subfolder is here to the rescue!
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(VCPKG_TARGET_IS_WINDOWS)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release")
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
Expand All @@ -114,6 +116,6 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore
endif()

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre-next RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

vcpkg_copy_pdbs()
2 changes: 1 addition & 1 deletion ports/ogre/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: ogre
Version: 1.12.1
Version: 1.12.1-1
Build-Depends: freeimage, freetype, zlib, zziplib
Homepage: https://github.com/OGRECave/ogre
Description: 3D Object-Oriented Graphics Rendering Engine
Expand Down
44 changes: 13 additions & 31 deletions ports/ogre/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include(vcpkg_common_functions)
if (EXISTS "${CURRENT_INSTALLED_DIR}/Media/HLMS/Blendfunctions_piece_fs.glslt")
message(FATAL_ERROR "FATAL ERROR: ogre-next and ogre are incompatible.")
endif()

if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(NOT VCPKG_TARGET_IS_WINDOWS)
message("${PORT} currently requires the following library from the system package manager:\n Xaw\n\nIt can be installed on Ubuntu systems via apt-get install libxaw7-dev")
endif()

Expand All @@ -24,29 +26,12 @@ endif()

# Configure features

if("d3d9" IN_LIST FEATURES)
set(WITH_D3D9 ON)
else()
set(WITH_D3D9 OFF)
endif()

if("java" IN_LIST FEATURES)
set(WITH_JAVA ON)
else()
set(WITH_JAVA OFF)
endif()

if("python" IN_LIST FEATURES)
set(WITH_PYTHON ON)
else()
set(WITH_PYTHON OFF)
endif()

if("csharp" IN_LIST FEATURES)
set(WITH_CSHARP ON)
else()
set(WITH_CSHARP OFF)
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
d3d9 OGRE_BUILD_RENDERSYSTEM_D3D9
java OGRE_BUILD_COMPONENT_JAVA
python OGRE_BUILD_COMPONENT_PYTHON
csharp OGRE_BUILD_COMPONENT_CSHARP
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
Expand All @@ -73,10 +58,7 @@ vcpkg_configure_cmake(
-DOGRE_BUILD_RENDERSYSTEM_GLES=OFF
-DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF
# Optional stuff
-DOGRE_BUILD_COMPONENT_JAVA=${WITH_JAVA}
-DOGRE_BUILD_COMPONENT_PYTHON=${WITH_PYTHON}
-DOGRE_BUILD_COMPONENT_CSHARP=${WITH_CSHARP}
-DOGRE_BUILD_RENDERSYSTEM_D3D9=${WITH_D3D9}
${FEATURE_OPTIONS}
# vcpkg specific stuff
-DOGRE_CMAKE_DIR=share/ogre
)
Expand Down Expand Up @@ -105,7 +87,7 @@ endif()

#Remove OgreMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol
#manual-link subfolder is here to the rescue!
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(VCPKG_TARGET_IS_WINDOWS)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release")
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
Expand All @@ -132,6 +114,6 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore
endif()

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

vcpkg_copy_pdbs()

0 comments on commit fea5813

Please sign in to comment.