Skip to content

Commit

Permalink
refactor: Move cpp-sc2 to dedicated submodules dir
Browse files Browse the repository at this point in the history
For convenience when new modules will be added.

Signed-off-by: Alexander Kurbatov <[email protected]>
  • Loading branch information
Alexander Kurbatov authored and Alexander Kurbatov committed Jul 17, 2021
1 parent b107cc2 commit f65221d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "cpp-sc2"]
path = cpp-sc2
url = https://github.com/alkurbatov/cpp-sc2.git
[submodule "contrib/cpp-sc2"]
path = contrib/cpp-sc2
url = [email protected]:cpp-sc2/cpp-sc2.git
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ set(BUILD_API_TESTS OFF CACHE INTERNAL "" FORCE)
# Dont build sc2renderer in the sc2api submodule.
set(BUILD_SC2_RENDERER OFF CACHE INTERNAL "" FORCE)

add_subdirectory("cpp-sc2")
add_subdirectory("contrib/cpp-sc2")
add_subdirectory("src")
1 change: 1 addition & 0 deletions contrib/cpp-sc2
Submodule cpp-sc2 added at 4f7dfd
1 change: 0 additions & 1 deletion cpp-sc2
Submodule cpp-sc2 deleted from 08f93f
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
file(GLOB_RECURSE BOT_SOURCES "*.cpp" "*.h")

include_directories(SYSTEM
${PROJECT_SOURCE_DIR}/cpp-sc2/include
${PROJECT_SOURCE_DIR}/cpp-sc2/contrib/protobuf/src
${PROJECT_BINARY_DIR}/cpp-sc2/generated
${PROJECT_SOURCE_DIR}/contrib/cpp-sc2/include
${PROJECT_SOURCE_DIR}/contrib/cpp-sc2/contrib/protobuf/src
${PROJECT_BINARY_DIR}/contrib/cpp-sc2/generated
"."
)

link_directories(${PROJECT_BINARY_DIR}/cpp-sc2/bin)
link_directories(${PROJECT_BINARY_DIR}/contrib/cpp-sc2/bin)

if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX-")
Expand Down

0 comments on commit f65221d

Please sign in to comment.