File tree Expand file tree Collapse file tree 5 files changed +24
-27
lines changed Expand file tree Collapse file tree 5 files changed +24
-27
lines changed Original file line number Diff line number Diff line change 11
11
- ' **.c'
12
12
- ' **.cmake'
13
13
- ' **.txt'
14
+ - ' **.json'
14
15
- ' .github/workflows/build.yml'
15
16
workflow_dispatch :
16
17
41
42
runs-on : ${{ matrix.os }}
42
43
43
44
steps :
45
+ - uses : lukka/get-cmake@latest
46
+
44
47
- uses : actions/checkout@v4
45
48
with :
46
49
submodules : ' recursive'
Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.22)
2
2
enable_language (CXX C)
3
3
4
- # Require C++ 17
5
- set (CMAKE_CXX_STANDARD 17)
6
- set (CMAKE_CXX_STANDARD_REQUIRED ON )
7
-
8
- # Enable -fPIC flag
9
- set (CMAKE_POSITION_INDEPENDENT_CODE ON )
10
-
11
4
# Enable IDE folders
12
5
set_property (GLOBAL PROPERTY USE_FOLDERS ON )
13
6
@@ -21,15 +14,18 @@ if(APPLE)
21
14
)
22
15
endif ()
23
16
24
- # Include extensions
25
- add_subdirectory (cmake)
17
+ list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
26
18
27
- # Include garrysmod_common
28
- find_garrysmod_common()
29
- if (NOT GARRYSMOD_COMMON_FOUND) # Check if garrysmod_common has been found
30
- message (FATAL_ERROR "garrysmod_common not found" )
31
- endif ()
19
+ project (gm_asyncio VERSION 1.0.1 LANGUAGES CXX)
20
+
21
+ # Enable -fPIC flag
22
+ set (CMAKE_POSITION_INDEPENDENT_CODE ON )
23
+
24
+ # Require C++ 17
25
+ set (CMAKE_CXX_STANDARD 17)
26
+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
27
+ set (CMAKE_CXX_EXTENSIONS OFF )
32
28
33
- project (gm_asyncio VERSION 1.0.0 LANGUAGES CXX )
29
+ find_package (GarrysmodCommon REQUIRED )
34
30
35
31
add_subdirectory (source )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ message (STATUS "Looking for garrysmod_common..." )
2
+ set (GARRYSMOD_COMMON_PATH "GARRYSMOD_COMMON_NOT_FOUND" CACHE PATH "Path to garrysmod_common (https://github.com/dankmolot/garrysmod_common/tree/master-cmake)" )
3
+ cmake_path(ABSOLUTE_PATH GARRYSMOD_COMMON_PATH NORMALIZE)
4
+
5
+ if (NOT IS_DIRECTORY ${GARRYSMOD_COMMON_PATH} OR NOT EXISTS ${GARRYSMOD_COMMON_PATH} /CMakeLists.txt OR ${GARRYSMOD_COMMON_PATH} STREQUAL ${CMAKE_CURRENT_LIST_DIR} )
6
+ message (FATAL_ERROR "Invalid path to garrysmod_common. Please set valid GARRYSMOD_COMMON_PATH" )
7
+ endif ()
8
+
9
+ add_subdirectory (${GARRYSMOD_COMMON_PATH} ${CMAKE_BINARY_DIR} /garrysmod_common)
10
+ set (GarrysmodCommon_FOUND TRUE )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments