|
1 | 1 | newoption({
|
2 |
| - trigger = "gmcommon", |
3 |
| - description = "Sets the path to the garrysmod_common (https://bitbucket.org/danielga/garrysmod_common) directory", |
4 |
| - value = "path to garrysmod_common dir" |
| 2 | + trigger = "compile-cryptopp", |
| 3 | + description = "Compile cryptopp along with the modules" |
5 | 4 | })
|
6 | 5 |
|
7 | 6 | newoption({
|
8 |
| - trigger = "compile-cryptopp", |
9 |
| - description = "Compile cryptopp along with the modules" |
| 7 | + trigger = "gmcommon", |
| 8 | + description = "Sets the path to the garrysmod_common (https://github.com/danielga/garrysmod_common) directory", |
| 9 | + value = "path to garrysmod_common directory" |
10 | 10 | })
|
11 | 11 |
|
12 | 12 | local gmcommon = _OPTIONS.gmcommon or os.getenv("GARRYSMOD_COMMON")
|
13 | 13 | if gmcommon == nil then
|
14 |
| - error("you didn't provide a path to your garrysmod_common (https://bitbucket.org/danielga/garrysmod_common) directory") |
| 14 | + error("you didn't provide a path to your garrysmod_common (https://github.com/danielga/garrysmod_common) directory") |
15 | 15 | end
|
16 | 16 |
|
17 | 17 | include(gmcommon)
|
18 | 18 |
|
19 |
| -local CRYPTOPP_FOLDER = "../cryptopp" |
| 19 | +local CRYPTOPP_DIRECTORY = "../cryptopp" |
20 | 20 |
|
21 |
| -CreateSolution("crypt") |
| 21 | +CreateWorkspace({name = "crypt"}) |
22 | 22 | warnings("Off")
|
23 | 23 |
|
24 |
| - CreateProject(SERVERSIDE) |
| 24 | + CreateProject({serverside = true}) |
25 | 25 | IncludeLuaShared()
|
26 | 26 | defines("CRYPTOPP_ENABLE_NAMESPACE_WEAK=1")
|
27 | 27 |
|
28 |
| - SetFilter(FILTER_WINDOWS, "options:not compile-cryptopp") |
29 |
| - includedirs(CRYPTOPP_FOLDER .. "/include") |
30 |
| - libdirs(CRYPTOPP_FOLDER .. "/lib") |
| 28 | + filter({"system:windows", "options:not compile-cryptopp"}) |
| 29 | + includedirs(CRYPTOPP_DIRECTORY .. "/include") |
| 30 | + libdirs(CRYPTOPP_DIRECTORY .. "/lib") |
31 | 31 | links("cryptopp")
|
32 | 32 |
|
33 |
| - SetFilter(FILTER_LINUX, FILTER_MACOSX, "options:not compile-cryptopp") |
| 33 | + filter({"system:linux or macosx", "options:not compile-cryptopp"}) |
34 | 34 | linkoptions("-Wl,-Bstatic,-lcryptopp,-Bdynamic")
|
35 | 35 |
|
36 |
| - SetFilter("options:compile-cryptopp") |
37 |
| - includedirs(CRYPTOPP_FOLDER .. "/include") |
| 36 | + filter("options:compile-cryptopp") |
| 37 | + includedirs(CRYPTOPP_DIRECTORY .. "/include") |
38 | 38 | links("cryptopp")
|
39 | 39 |
|
40 |
| - CreateProject(CLIENTSIDE) |
| 40 | + CreateProject({serverside = false}) |
41 | 41 | IncludeLuaShared()
|
42 | 42 | defines("CRYPTOPP_ENABLE_NAMESPACE_WEAK=1")
|
43 | 43 |
|
44 |
| - SetFilter(FILTER_WINDOWS, "options:not compile-cryptopp") |
45 |
| - includedirs(CRYPTOPP_FOLDER .. "/include") |
46 |
| - libdirs(CRYPTOPP_FOLDER .. "/lib") |
| 44 | + filter({"system:windows", "options:not compile-cryptopp"}) |
| 45 | + includedirs(CRYPTOPP_DIRECTORY .. "/include") |
| 46 | + libdirs(CRYPTOPP_DIRECTORY .. "/lib") |
47 | 47 | links("cryptopp")
|
48 | 48 |
|
49 |
| - SetFilter(FILTER_LINUX, FILTER_MACOSX, "options:not compile-cryptopp") |
| 49 | + filter({"system:linux or macosx", "options:not compile-cryptopp"}) |
50 | 50 | linkoptions("-Wl,-Bstatic,-lcryptopp,-Bdynamic")
|
51 | 51 |
|
52 |
| - SetFilter("options:compile-cryptopp") |
53 |
| - includedirs(CRYPTOPP_FOLDER .. "/include") |
| 52 | + filter("options:compile-cryptopp") |
| 53 | + includedirs(CRYPTOPP_DIRECTORY .. "/include") |
54 | 54 | links("cryptopp")
|
55 | 55 |
|
56 | 56 | if _OPTIONS["compile-cryptopp"] then
|
57 | 57 | project("cryptopp")
|
58 | 58 | kind("StaticLib")
|
59 | 59 | defines("USE_PRECOMPILED_HEADERS")
|
60 | 60 | includedirs({
|
61 |
| - CRYPTOPP_FOLDER .. "/include/cryptopp", |
62 |
| - CRYPTOPP_FOLDER .. "/src" |
| 61 | + CRYPTOPP_DIRECTORY .. "/include/cryptopp", |
| 62 | + CRYPTOPP_DIRECTORY .. "/src" |
63 | 63 | })
|
64 | 64 | files({
|
65 |
| - CRYPTOPP_FOLDER .. "/include/cryptopp/*.h", |
66 |
| - CRYPTOPP_FOLDER .. "/src/*.cpp" |
| 65 | + CRYPTOPP_DIRECTORY .. "/include/cryptopp/*.h", |
| 66 | + CRYPTOPP_DIRECTORY .. "/src/*.cpp" |
67 | 67 | })
|
68 | 68 | vpaths({
|
69 |
| - ["Header files"] = CRYPTOPP_FOLDER .. "/**.h", |
70 |
| - ["Source files"] = CRYPTOPP_FOLDER .. "/**.cpp" |
| 69 | + ["Header files"] = CRYPTOPP_DIRECTORY .. "/*.h", |
| 70 | + ["Source files"] = CRYPTOPP_DIRECTORY .. "/*.cpp" |
71 | 71 | })
|
72 | 72 | end
|
0 commit comments