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

Fixed cmake configure with default options turned off #532

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Extern/Lua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ install(TARGETS lua-exe DESTINATION ${ORBITER_INSTALL_SDK_DIR}/Utils/)

# Library - lua.dll
add_library(lua SHARED ${LUA_SRC_FILES})
target_compile_definitions(lua PUBLIC LUA_BUILD_AS_DLL)

if(MSVC)
target_compile_definitions(lua PUBLIC LUA_BUILD_AS_DLL)
else()
target_link_libraries(lua-exe PUBLIC m)
target_link_libraries(lua PUBLIC m)
endif()

set_target_properties(lua PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR}
Expand Down
18 changes: 11 additions & 7 deletions Src/Module/LuaScript/LuaInterpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(BUILD_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/out)
add_library(LuaInterpreter SHARED
Interpreter.cpp
lua_vessel_mtd.cpp
lua_xrsound.cpp
lua_xrsound.cpp
)

target_include_directories(LuaInterpreter
Expand All @@ -21,18 +21,22 @@ target_link_libraries(LuaInterpreter
${ORBITER_LIB}
${ORBITER_SDK_LIB}
lua::lib
XRSound_lib
)

add_dependencies(LuaInterpreter
${OrbiterTgt}
Orbitersdk
D3D9Client
D3D9Client_Interface
XRSound_lib
XRSound_assets
)

if(ORBITER_BUILD_D3D9CLIENT)
add_dependencies(LuaInterpreter D3D9Client D3D9Client_Interface)
endif()

if(ORBITER_BUILD_XRSOUND)
add_dependencies(LuaInterpreter XRSound_lib XRSound_assets)
target_link_libraries(LuaInterpreter XRSound_lib)
endif()

set_target_properties(LuaInterpreter
PROPERTIES
FOLDER Modules/Lua
Expand Down Expand Up @@ -85,4 +89,4 @@ install(TARGETS LuaInterpreter
)
install(FILES $<TARGET_LINKER_FILE:LuaInterpreter>
DESTINATION ${ORBITER_INSTALL_SDK_DIR}/lib/Lua
)
)
Loading