-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #474 from DarkWanderer/revert-to-fetch
Revert Orbiter to use Fetch mechanism instead of submodules
- Loading branch information
Showing
32 changed files
with
151 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Catch2
deleted from
3f0283
Submodule Lua
deleted from
69ea08
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
project(lua) | ||
|
||
Include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
lua | ||
GIT_REPOSITORY https://github.com/lua/lua.git | ||
GIT_TAG v5.1 | ||
) | ||
FetchContent_MakeAvailable(lua) | ||
|
||
file(GLOB LUA_SRC_FILES "${lua_SOURCE_DIR}/*.c") | ||
file(GLOB LUA_HDR_FILES "${lua_SOURCE_DIR}/*.h") | ||
|
||
list(REMOVE_ITEM LUA_SRC_FILES "${lua_SOURCE_DIR}/lua.c") | ||
list(REMOVE_ITEM LUA_SRC_FILES "${lua_SOURCE_DIR}/luac.c") | ||
list(REMOVE_ITEM LUA_SRC_FILES "${lua_SOURCE_DIR}/print.c") | ||
|
||
# Executable - lua.exe | ||
add_executable(lua-exe ${LUA_SRC_FILES} "${lua_SOURCE_DIR}/lua.c") | ||
set_target_properties(lua-exe PROPERTIES OUTPUT_NAME lua) | ||
|
||
set_target_properties(lua-exe PROPERTIES | ||
ARCHIVE_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} | ||
LIBRARY_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} | ||
RUNTIME_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} | ||
) | ||
|
||
install(TARGETS lua-exe RUNTIME DESTINATION ${ORBITER_INSTALL_ROOT_DIR}) | ||
install(TARGETS lua-exe DESTINATION ${ORBITER_INSTALL_SDK_DIR}/lib/Lua) | ||
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) | ||
|
||
set_target_properties(lua PROPERTIES | ||
ARCHIVE_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} | ||
LIBRARY_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} | ||
RUNTIME_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} | ||
) | ||
install(TARGETS lua DESTINATION ${ORBITER_INSTALL_ROOT_DIR}) | ||
|
||
set(LUA_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include) | ||
file(COPY ${LUA_HDR_FILES} DESTINATION ${LUA_INCLUDE_DIR}) | ||
target_include_directories(lua INTERFACE ${LUA_INCLUDE_DIR}) | ||
|
||
# Aliases for easier reference | ||
add_executable(lua::exe ALIAS lua-exe) | ||
add_library(lua::lib ALIAS lua) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# How to add new dependency | ||
|
||
If you want to add new dependency, the way to add it will depend on the type | ||
|
||
## lunarmodule dependency | ||
|
||
Use `add_lunarmodule` function in Extern/CMakeLists.txt with appropriate tag: | ||
|
||
``` | ||
add_lunarmodule(ldoc v1.5.0) | ||
``` | ||
|
||
## C++ dependency | ||
|
||
1. Create a new directory (e.g. `mylib`) | ||
1. Add a line to Extern/CMakeLists.txt: `add_subdirectory(mylib)` | ||
1. Copy `Extern/zlib/CMakeLists.txt` to new directory | ||
1. Edit the file replacing `zlib` with `mylib` and adding new repository URL | ||
1. Add other tweaks to `CMakeLists.txt` as necessary |
Submodule zlib
deleted from
04f42c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
project(zlib) | ||
|
||
Include(FetchContent) | ||
|
||
set(SKIP_INSTALL_ALL ON) | ||
|
||
FetchContent_Declare( | ||
zlib | ||
GIT_REPOSITORY https://github.com/madler/zlib.git | ||
GIT_TAG v1.2.11 | ||
) | ||
FetchContent_MakeAvailable(zlib) | ||
target_include_directories(zlib INTERFACE ${zlib_SOURCE_DIR}) | ||
target_include_directories(zlib INTERFACE ${zlib_BINARY_DIR}) | ||
|
||
set_target_properties(zlib PROPERTIES | ||
ARCHIVE_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} | ||
LIBRARY_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} | ||
RUNTIME_OUTPUT_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} | ||
) | ||
install(TARGETS zlib RUNTIME DESTINATION ${ORBITER_INSTALL_ROOT_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.