Update cmake

This commit is contained in:
Tilen Majerle 2021-12-24 14:01:17 +01:00
parent cbc215be11
commit d9f91da6df
3 changed files with 9 additions and 7 deletions

2
.vscode/launch.json vendored
View File

@ -8,7 +8,7 @@
"name": "(Windows) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}\\build\\LwLibPROJECT.exe",
"program": "${workspaceFolder}\\build\\LwMEM.exe",
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
"args": [],
"stopAtEntry": false,

2
.vscode/tasks.json vendored
View File

@ -46,7 +46,7 @@
{
"type": "shell",
"label": "Run application",
"command": "${workspaceFolder}\\build\\LwLibPROJECT.exe",
"command": "${workspaceFolder}\\build\\LwMEM.exe",
"args": [],
"problemMatcher": [],
},

View File

@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.0.0)
project(LwMEM VERSION 2.0.1)
# ------------------------
# Configuration used if this is used as
# Configuration used if cmake uses this as
# top-level project CMakeLists.txt file
# This is normally used for development purpose only
if (PROJECT_IS_TOP_LEVEL)
@ -26,8 +26,10 @@ if (PROJECT_IS_TOP_LEVEL)
CONSOLE
LWMEM_DEV
)
endif()
# Add subdir with lwmem and link to the project
add_subdirectory("lwmem")
target_link_libraries(${PROJECT_NAME} lwmem)
# Add subdir with lwmem and link to the project
add_subdirectory("lwmem")
target_link_libraries(${PROJECT_NAME} lwmem)
else()
message("LWMEM: For library link, use CMakeLists.txt in /lwmem directory")
endif()