Skip to content

Conversation

@a17r
Copy link

@a17r a17r commented Jan 24, 2026

There may be a few occasions of bin/lib in WIN32 branches that I missed yet, and the CMake <3.20 fallback is a bit crude still.

@AnyOldName3
Copy link
Member

Are you expecting any of the paths to end up different for platforms that aren't explicitly making them different by customising GNUInstallDirs?

@a17r
Copy link
Author

a17r commented Jan 27, 2026

Are you expecting any of the paths to end up different for platforms that aren't explicitly making them different by customising GNUInstallDirs?

Not at all, except for WIN32's LIBDIR=bin config, that's why this extra handling needs to stay - when we look at the main section determining these install paths for osg-openmw so far, we see this correlating with GNUInstallDirs defaults:

-SET(INSTALL_INCDIR include)
-SET(INSTALL_BINDIR bin)
-IF(WIN32)
-    SET(INSTALL_LIBDIR bin)
-    SET(INSTALL_ARCHIVEDIR lib)
-ELSE()
-    SET(INSTALL_LIBDIR lib${LIB_POSTFIX})
-    SET(INSTALL_ARCHIVEDIR lib${LIB_POSTFIX})
-ENDIF()
  • BINDIR user executables (bin)
  • LIBDIR object code libraries (lib or - if CMAKE_SYSTEM_NAME MATCHES "^(Linux|GNU)$" with further detection - lib64)
  • INCLUDEDIR C header files (include)

@a17r a17r force-pushed the gnuinstalldirs branch 2 times, most recently from caf9254 to a64ae23 Compare January 27, 2026 20:17
Comment on lines -51 to +49
LIBRARY DESTINATION lib COMPONENT libopenthreads
RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenthreads
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libopenthreads
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libopenthreads
Copy link
Author

Choose a reason for hiding this comment

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

Please note this was already deviating from elsewhere in osg where LIBRARY DESTINATION for WIN32 is bin instead of lib, so I kept it that way.

a17r added 2 commits January 28, 2026 23:16
- Consolidate the use of different variables for bin, lib and include
- Keep ${exec_prefix}/ in pkgconfig, deriving relative paths from std vars
- Use CMAKE_INSTALL_FULL_* where absolute paths are expected
- Ensure GNUInstallDirs is included early in the project
- For WIN32, keep the existing bin installdir for libraries

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
@psi29a psi29a merged commit 170dae5 into OpenMW:3.6 Jan 29, 2026
1 check passed
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.

3 participants