Skip to content

Update CMakeLists.txt#57

Open
SoraKagami wants to merge 2 commits intodaz3d:mainfrom
SoraKagami:main
Open

Update CMakeLists.txt#57
SoraKagami wants to merge 2 commits intodaz3d:mainfrom
SoraKagami:main

Conversation

@SoraKagami
Copy link

These changes are Apache 2.0

  • CMAKE_BUILD_TYPE will default to Release if empty (forced).
  • DAZ_STUDIO_EXE_DIR, DAZ_SDK_DIR, ALEMBIC_DIR, FBX_SDK_DIR, IMATH_DIR, OPENSUBDIV_DIR: If paths are not empty, leave them alone. If they're empty, try and auto detect default install paths & fill if present (Windows OS only). Related original code have been moved or replaced.
  • Added example paths for Windows platforms for the above variables.
  • QT_BINARY_DIR : Auto-populates if DAZ_SDK_DIR has been correctly set. Will ignore the field if text has been detected in case custom changes are made on purpose.
  • QT_BINARY_DIR : Edited popup description to reflect that this is supposed to point to the DAZ SDK's Qt exes.
  • QT_IMPORTS_DIR : Force set the path & description to explain that this is not in use by DazToUnreal. By default it used to point to a Daz developer's private folder.
  • QT_IMPORTS_DIR : Now hidden from default view, and should only be visible when advanced is toggled on.
  • QT_DOC_DIR : Now auto-populates & points to Daz SDK's copy. Untested if this has any effect.
  • OPENSUBDIV_INCLUDE now auto-points to the /include subfolder of ${OPENSUBDIV_DIR} following OpenSubdiv's expected include installed location.
  • OPENSUBDIV_LIB now points to ${OPENSUBDIV_DIR}/lib/osdCPU.lib following OpenSubdiv's expected lib installed location.

The above changes have been tested and confirmed as working when tested with CMake (gui) v3.24.1 on Windows 10 for both DazToUnreal 2023 v1.2 (2023.1.2.63) and DazToUnreal v5.2.1.207 with Visual Studio 2019.

Default folders checked on windows for non-Daz libraries ALEMBIC_DIR, FBX_SDK_DIR, IMATH_DIR, OPENSUBDIV_DIR are either C:/Program Files/ or C:/Program Files (x86)/ as appropriate based on their default install/compile-to locations.
C:/dev/ is also checked if the above checks fail.

These changes are Apache 2.0

* CMAKE_BUILD_TYPE will default to Release if empty (forced).
* DAZ_STUDIO_EXE_DIR, DAZ_SDK_DIR, ALEMBIC_DIR, FBX_SDK_DIR, IMATH_DIR, OPENSUBDIV_DIR: If paths are not empty, leave them alone. If they're empty, try and auto detect default install paths & fill if present. Related original code have been moved or replaced.
* Added example paths for Windows platforms for the above variables.
* QT_BINARY_DIR : Auto-populates if DAZ_SDK_DIR has been correctly set. Will ignore the field if text has been detected in case custom changes are made on purpose.
* QT_BINARY_DIR : Edited popup description to reflect that this is supposed to point to the DAZ SDK's Qt exes.
* QT_IMPORTS_DIR : Force set the path & description to explain that this is not in use by DazToUnreal. By default it used to point to a Daz developer's private folder.
* QT_IMPORTS_DIR : Now hidden from default view, and should only be visible when advanced is toggled on.
* QT_DOC_DIR : Now auto-populates & points to Daz SDK's copy. Untested if this has any effect.
* OPENSUBDIV_INCLUDE now auto-points to the /include subfolder of OPENSUBDIV_DIR following OpenSubdiv's expected include installed location.
* OPENSUBDIV_LIB now points to ${OPENSUBDIV_DIR}/lib/osdCPU.lib following OpenSubdiv's expected lib installed location.

The above CMake file has been tested and confirmed as working when tested with CMake (gui) v3.24.1 on Windows 10 for both DazToUnreal 2023 v1.2 (2023.1.2.63) and DazToUnreal v5.2.1.207 with Visual Studio 2019.

Default folders checked on windows for non-Daz components ALEMBIC_DIR, FBX_SDK_DIR, IMATH_DIR, OPENSUBDIV_DIR are either Program Files or Program Files (x86) as appropriate based on the default install/compile-to locations for each component.
C:\dev\  is also checked if the above checks fail.
@danielbui78 danielbui78 self-requested a review September 21, 2023 13:50
@danielbui78
Copy link
Contributor

Thank you for your submission! It is currently breaking support for my pre-built release of OpenSubdiv:
https://github.com/danielbui78/OpenSubdiv/releases

Updated the (Windows) folder detection logic for Alembic, FBX SDK, Imath and OpenSubdiv so that by default it will now search through three default locations using a foreach loop.

WIN_PROGRAM_FILES "C:/Program Files"
WIN_PROGRAM_FILES_X86 "C:/Program Files (x86)"
WIN_DEV_FOLDER "C:/dev"
@SoraKagami
Copy link
Author

Thanks @danielbui78 , I have just updated the (Windows) folder detection logic for Alembic, FBX SDK, Imath and OpenSubdiv so that by default it will now search through three default locations using a foreach loop instead of assuming that the default location will always be hardcoded to either "Program Files" or "Program Files (x86)".

This should make it more flexible for users too since they can now customise one of the three vars (i.e. WIN_DEV_FOLDER) to point to a different folder if needed.

Please let me know if this doesn't work on your end.

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.

2 participants