Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added OIS port #8507

Merged
merged 5 commits into from Oct 30, 2019
Merged

Added OIS port #8507

merged 5 commits into from Oct 30, 2019

Conversation

vpaladino778
Copy link
Contributor

Created OIS Port. I wasn't sure if vcpkg_fixup_cmake_targets should be used here. When it's uncommented, it returned 'C:/vcpkg/packages/ois_x86-windows/debug/lib/cmake/ois' does not exist so i figured it wasn't necessary here.

#8451

@vpaladino778
Copy link
Contributor Author

So it looks like the build is failing with:

Win32JoyStick.cpp.obj : error LNK2019: unresolved external symbol __imp_CoUninitialize referenced in function "public: static void __cdecl OIS::Win32JoyStick::CheckXInputDevices(class std::vector<class OIS::JoyStickInfo,class std::allocator<class OIS::JoyStickInfo> > &)" (?CheckXInputDevices@Win32JoyStick@OIS@@SAXAEAV?$vector@VJoyStickInfo@OIS@@V?$allocator@VJoyStickInfo@OIS@@@std@@@std@@@Z)
Win32JoyStick.cpp.obj : error LNK2019: unresolved external symbol __imp_CoSetProxyBlanket referenced in function "public: static void __cdecl OIS::Win32JoyStick::CheckXInputDevices(class std::vector<class OIS::JoyStickInfo,class std::allocator<class OIS::JoyStickInfo> > &)" (?CheckXInputDevices@Win32JoyStick@OIS@@SAXAEAV?$vector@VJoyStickInfo@OIS@@V?$allocator@VJoyStickInfo@OIS@@@std@@@std@@@Z)
Win32JoyStick.cpp.obj : error LNK2019: unresolved external symbol __imp_CoCreateInstance referenced in function "public: static void __cdecl OIS::Win32JoyStick::CheckXInputDevices(class std::vector<class OIS::JoyStickInfo,class std::allocator<class OIS::JoyStickInfo> > &)" (?CheckXInputDevices@Win32JoyStick@OIS@@SAXAEAV?$vector@VJoyStickInfo@OIS@@V?$allocator@VJoyStickInfo@OIS@@@std@@@std@@@Z)
Win32JoyStick.cpp.obj : error LNK2019: unresolved external symbol __imp_CoInitialize referenced in function "public: static void __cdecl OIS::Win32JoyStick::CheckXInputDevices(class std::vector<class OIS::JoyStickInfo,class std::allocator<class OIS::JoyStickInfo> > &)" (?CheckXInputDevices@Win32JoyStick@OIS@@SAXAEAV?$vector@VJoyStickInfo@OIS@@V?$allocator@VJoyStickInfo@OIS@@@std@@@std@@@Z)
Win32JoyStick.cpp.obj : error LNK2019: unresolved external symbol __imp_SysAllocString referenced in function "public: static void __cdecl OIS::Win32JoyStick::CheckXInputDevices(class std::vector<class OIS::JoyStickInfo,class std::allocator<class OIS::JoyStickInfo> > &)" (?CheckXInputDevices@Win32JoyStick@OIS@@SAXAEAV?$vector@VJoyStickInfo@OIS@@V?$allocator@VJoyStickInfo@OIS@@@std@@@std@@@Z)
Win32JoyStick.cpp.obj : error LNK2019: unresolved external symbol __imp_SysFreeString referenced in function "public: static void __cdecl OIS::Win32JoyStick::CheckXInputDevices(class std::vector<class OIS::JoyStickInfo,class std::allocator<class OIS::JoyStickInfo> > &)" (?CheckXInputDevices@Win32JoyStick@OIS@@SAXAEAV?$vector@VJoyStickInfo@OIS@@V?$allocator@VJoyStickInfo@OIS@@@std@@@std@@@Z)
OIS_d.dll : fatal error LNK1120: 6 unresolved externals

I'm trying to figure out if there's a missing dependency. According to the github page windows builds depend on DirectX SDK (now part of the Windows SDK). But i believe vcpkg depends on Windows SDK as well, so this shouldn't be an issue. It looks like there's some other library missing though.

@cenit cenit mentioned this pull request Oct 8, 2019
@MVoz
Copy link
Contributor

MVoz commented Oct 9, 2019

latest winsdk 10.0.17133.0

delete ?

https://github.com/wgois/OIS/blob/master/CMakeModules/FindWindowsSDK.cmake

two lib files

if (WINDOWSSDK_FOUND)
target_link_libraries(OIS "dinput8.lib" "dxguid.lib")

@AlvinZhangH
Copy link
Contributor

@vpaladino778, CI vcpkg-windows-PR failed, add code as follow can solved:
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()

@vpaladino778
Copy link
Contributor Author

@vpaladino778, CI vcpkg-windows-PR failed, add code as follow can solved:
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()

Hello! Thanks for your reply. I added the lines you mentioned but it looks like it's still failing on windows for some reason.

@JackBoosY
Copy link
Contributor

Does this port support arm/uwp?

@vpaladino778
Copy link
Contributor Author

@JackBoosY I've opened up an issue on the OIS github page to check. In the meantime, should i add two vcpkg_fail_port_install calls to fail early on ARM and UWP?

@JackBoosY JackBoosY self-requested a review October 15, 2019 02:19
@JackBoosY
Copy link
Contributor

@vpaladino778 Yep, If OIS doesn't support these arch, you need to add vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") to portfile.cmake.

ports/ois/portfile.cmake Outdated Show resolved Hide resolved
ports/ois/portfile.cmake Outdated Show resolved Hide resolved
vcpkg_install_cmake()

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which files will be generated here?

@MVoz
Copy link
Contributor

MVoz commented Oct 15, 2019

has the build been tested or not?


2019-10-15_175428

@JackBoosY
Copy link
Contributor

@voskrese CI has problem, we will fix it tomorrow.

@JackBoosY
Copy link
Contributor

/azp run

ports/ois/portfile.cmake Outdated Show resolved Hide resolved
@dan-shaw dan-shaw merged commit 00a29c6 into microsoft:master Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants