File tree 2 files changed +60
-15
lines changed
2 files changed +60
-15
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,16 @@ jobs:
14
14
15
15
- uses : ilammy/msvc-dev-cmd@v1
16
16
17
+ - name : Install Meson
18
+ run : |
19
+ choco install meson
20
+ choco install ninja
21
+
17
22
# don't use run-cmake for windows because only one build should add warnings to pull request
18
23
- name : Build Debug
19
24
run : |
20
- mkdir debug
21
- cd debug
22
- cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
23
- nmake
25
+ meson setup debug --buildtype=debug --backend=vs
26
+ meson compile -C debug
24
27
25
28
- name : Upload ryzenadj debug
26
29
uses : actions/upload-artifact@v2
32
35
33
36
- name : Build Release
34
37
run : |
35
- mkdir build
36
- cd build
37
- cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..
38
- nmake
38
+ meson setup build --buildtype=release --backend=vs
39
+ meson compile -C build
39
40
40
41
- name : Prepair Release Folder
41
42
run : |
@@ -104,14 +105,10 @@ jobs:
104
105
sudo apt-get update
105
106
sudo apt-get install libpci-dev
106
107
107
- - name : run-cmake # with support for inline error reporting
108
-
109
-
110
- - name : Test make like readme
108
+ - name : Meson Build
111
109
run : |
112
- mkdir build && cd build
113
- cmake DCMAKE_BUILD_TYPE=Release ..
114
- make
110
+ meson setup build --buildtype=release
111
+ meson compile -C build
115
112
116
113
# - name: Test Scripts
117
114
# shell: bash
Original file line number Diff line number Diff line change
1
+ # Define the project
2
+ project (' ryzenadj' , ' c' ,
3
+ version : ' 1.0' , # You can set the version of your project here
4
+ default_options : [' c_visibilty=hidden' ]
5
+ )
6
+
7
+ add_project_arguments (' -D_LIBRYZENADJ_INTERNAL' , language : ' c' )
8
+
9
+ # Include directories
10
+ inc_dirs = include_directories (' .' ) # Adjust this if your include path is different
11
+
12
+ # Source directories
13
+ lib_srcs = files (
14
+ ' lib/nb_smu_ops.c' ,
15
+ ' lib/api.c' ,
16
+ ' lib/cpuid.c'
17
+ )
18
+
19
+ # OS-specific settings
20
+ if host_machine .system() == ' windows'
21
+ lib_srcs += files (' lib/osdep_win32.c' )
22
+ os_deps = declare_dependency (link_with : find_library (' WinRing0x64' , dirs : [' win32' ]))
23
+ elif host_machine .system() == ' linux'
24
+ lib_srcs += files (' lib/osdep_linux.c' )
25
+ os_deps = dependency (' libpci' , required : true )
26
+ else
27
+ error (' Unsupported OS' )
28
+ endif
29
+
30
+ cli_srcs = files (
31
+ ' argparse.c' ,
32
+ ' main.c' ,
33
+ )
34
+ cli_inc_dirs = include_directories (' lib' )
35
+
36
+ # Define executable
37
+ executable (' ryzenadj' , [lib_srcs, cli_srcs],
38
+ include_directories : cli_inc_dirs,
39
+ dependencies : os_deps,
40
+ install : true )
41
+
42
+ # Define library
43
+ libryzenadj = library (' libryzenadj' , lib_srcs,
44
+ dependencies : os_deps,
45
+ install : true )
46
+ install_headers (' lib/ryzenadj.h' , subdir : ' ryzenadj' )
47
+ pkg = import (' pkgconfig' )
48
+ pkg.generate(libryzenadj)
You can’t perform that action at this time.
0 commit comments