Skip to content

Commit

Permalink
Use the correct directory for ORCHLUA_PATH
Browse files Browse the repository at this point in the history
In other contexts, LUA_MODSHAREDIR will get converted from a relative path
to an absolute path via CMAKE_INSTALL_PREFIX prefixing.  In this context,
however, we need to fix it ourselves since ORCHLUA_PATH just gets set via
the preprocessor, which won't apply any pathing magic.

Signed-off-by: Kyle Evans <[email protected]>
  • Loading branch information
kevans91 committed Jan 25, 2024
1 parent e5e1d6b commit 4dab547
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ set(LUA_MODLIBDIR "lib/lua/${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}"
CACHE PATH "Path to install lua dynamic library modules into")
set(LUA_MODSHAREDIR "share/lua/${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}"
CACHE PATH "Path to install lua modules into")
set(ORCHLUA_PATH "${LUA_MODSHAREDIR}"
CACHE PATH "Path to install orch.lua into")
if(IS_ABSOLUTE "${LUA_MODSHAREDIR}")
set(ORCHLUA_PATH "${LUA_MODSHAREDIR}"
CACHE PATH "Path to install orch.lua into")
else()
set(ORCHLUA_PATH "${CMAKE_INSTALL_PREFIX}/${LUA_MODSHAREDIR}"
CACHE PATH "Path to install orch.lua into")
endif()
set(ORCHLUA_BINDIR "bin"
CACHE PATH "Path to install orch(1) into")
set(ORCHLUA_EXAMPLESDIR "share/${CMAKE_PROJECT_NAME}/examples"
Expand Down

0 comments on commit 4dab547

Please sign in to comment.