Skip to content

Commit

Permalink
Move prog to src, replace VS sln with CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
q4a committed Jun 12, 2021
1 parent 93aea27 commit 2b28967
Show file tree
Hide file tree
Showing 353 changed files with 308 additions and 1,111 deletions.
19 changes: 3 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
build*
bin
extern
.vs
*.vcxproj.*

prog/Debug/
prog/LexStd/Debug/
prog/MapEditor/Debug/
prog/NetLib/Debug/
prog/Rock3dEngine/Debug/
prog/Rock3dGame/Debug/
prog/RRR3d/Debug/

prog/Release/
prog/LexStd/Release/
prog/MapEditor/Release/
prog/NetLib/Release/
prog/Rock3dEngine/Release/
prog/Rock3dGame/Release/
prog/RRR3d/Release/

# Compiled Object files
*.slo
*.lo
Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
cmake_policy(VERSION 3.12)

set(RRR3D_VERSION "1.3.1")
project(rrr3d VERSION ${RRR3D_VERSION} LANGUAGES CXX)

include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)

add_subdirectory(src)
28 changes: 28 additions & 0 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"configurations": [
{
"name": "msvc-x86-debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x86" ],
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\bin\\${name}",
"cmakeCommandArgs": "-DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": []
},
{
"name": "msvc-x86-release",
"generator": "Ninja",
"configurationType": "Release",
"inheritEnvironments": [ "msvc_x86" ],
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\bin\\${name}",
"cmakeCommandArgs": "-DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": []
}
]
}
12 changes: 12 additions & 0 deletions cmake/utils.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
macro(add_dir DIRS FILE_GROUP)
foreach(dir ${DIRS})
message("adding ${dir} to ${FILE_GROUP}")
# include_directories(${dir})
file( GLOB ${dir}_SOURCE_ADD ${dir}/*.cpp ${dir}/*.cxx ${dir}/*.c )
list( APPEND ${FILE_GROUP}_SOURCE ${${dir}_SOURCE_ADD} )
file( GLOB ${dir}_INLINE_ADD ${dir}/*.inl )
list( APPEND ${FILE_GROUP}_INLINE ${${dir}_INLINE_ADD} )
file( GLOB ${dir}_HEADER_ADD ${dir}/*.h ${dir}/*.hpp )
list( APPEND ${FILE_GROUP}_HEADER ${${dir}_HEADER_ADD} )
endforeach()
endmacro()
138 changes: 0 additions & 138 deletions prog/LexStd/LexStd.vcxproj

This file was deleted.

Loading

0 comments on commit 2b28967

Please sign in to comment.