Skip to content

Commit 4bffed9

Browse files
committed
Convert project to CMake
1 parent a0d987e commit 4bffed9

File tree

6 files changed

+31
-61
lines changed

6 files changed

+31
-61
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
.vscode/.easycpp
2-
/bin
1+
/bin
2+
/build

.vscode/launch.json

+15-7
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,25 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "C++ Debug (Windows)",
5+
"name": "(Windows) Launch",
66
"type": "cppvsdbg",
77
"request": "launch",
8-
"program": "${workspaceFolder}/bin/q2togbsp.exe",
9-
"preLaunchTask": "Build C++ project",
10-
"args": ["C:/Users/rtxa/Documents/q2togbsp/bin/g3dtest1_quake1.map",
11-
"C:/Users/rtxa/Documents/q2togbsp/bin/g3dtest1_q2togbsp.map"
12-
],
8+
// Resolved by CMake Tools:
9+
"program": "${command:cmake.launchTargetPath}",
10+
"args": [
11+
"C:/Users/rtxa/Documents/q2togbsp/bin/g3dtest1_quake1.map",
12+
"C:/Users/rtxa/Documents/q2togbsp/bin/g3dtest1_q2togbsp.map"
13+
],
1314
"stopAtEntry": false,
1415
"cwd": "${workspaceFolder}",
15-
"environment": [],
16+
"environment": [
17+
{
18+
// add the directory where our target was built to the PATHs
19+
// it gets resolved by CMake Tools:
20+
"name": "PATH",
21+
"value": "$PATH:${command:cmake.launchTargetDirectory}"
22+
}
23+
],
1624
"externalConsole": true,
1725
}
1826
]

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@
5353
"xstddef": "cpp",
5454
"xtr1common": "cpp"
5555
},
56-
"terminal.integrated.shell.windows": "cmd.exe"
56+
"terminal.integrated.shell.windows": "cmd.exe",
57+
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
5758
}

.vscode/tasks.json

-37
This file was deleted.

CMakeLists.txt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cmake_minimum_required (VERSION 3.0.0)
2+
3+
project (q2togbsp)
4+
set(EXECUTABLE_OUTPUT_PATH ./${CMAKE_BUILD_TYPE})
5+
6+
file(
7+
GLOB_RECURSE
8+
MY_SOURCE_FILES
9+
src/*
10+
)
11+
12+
add_executable (${PROJECT_NAME} ${MY_SOURCE_FILES})

build.bat

-14
This file was deleted.

0 commit comments

Comments
 (0)