aboutsummaryrefslogtreecommitdiff
path: root/primedev
diff options
context:
space:
mode:
authorNorthstar <northstar@northstar.tf>2024-01-03 23:39:55 +0100
committerNorthstar <northstar@northstar.tf>2024-01-03 23:39:55 +0100
commit36e1093620c59f8ac10bd59d4d05ec3ceffd15f7 (patch)
tree67325d74fc2795500bb6638081eeac18c36dc0a4 /primedev
parentbaa706d25aa0eb0962551ae7b7978481db841c02 (diff)
downloadNorthstarLauncher-36e1093620c59f8ac10bd59d4d05ec3ceffd15f7.tar.gz
NorthstarLauncher-36e1093620c59f8ac10bd59d4d05ec3ceffd15f7.zip
Format cmake files
Diffstat (limited to 'primedev')
-rw-r--r--primedev/Launcher.cmake51
-rw-r--r--primedev/Northstar.cmake352
-rw-r--r--primedev/WSockProxy.cmake78
-rw-r--r--primedev/cmake/Findlibcurl.cmake57
-rw-r--r--primedev/cmake/Findminhook.cmake7
-rw-r--r--primedev/cmake/Findminizip.cmake46
-rw-r--r--primedev/cmake/Findspdlog.cmake7
-rw-r--r--primedev/cmake/utils.cmake39
8 files changed, 356 insertions, 281 deletions
diff --git a/primedev/Launcher.cmake b/primedev/Launcher.cmake
index 9edcf0e5..c04fc70b 100644
--- a/primedev/Launcher.cmake
+++ b/primedev/Launcher.cmake
@@ -1,33 +1,28 @@
# NorthstarLauncher
-add_executable(NorthstarLauncher
- "primelauncher/main.cpp"
- "primelauncher/resources.rc"
-)
+add_executable(NorthstarLauncher "primelauncher/main.cpp" "primelauncher/resources.rc")
-target_compile_definitions(NorthstarLauncher PRIVATE
- UNICODE
- _UNICODE
-)
+target_compile_definitions(NorthstarLauncher PRIVATE UNICODE _UNICODE)
-target_link_libraries(NorthstarLauncher PRIVATE
- shlwapi.lib
- kernel32.lib
- user32.lib
- gdi32.lib
- winspool.lib
- comdlg32.lib
- advapi32.lib
- shell32.lib
- ole32.lib
- oleaut32.lib
- uuid.lib
- odbc32.lib
- odbccp32.lib
- WS2_32.lib
-)
+target_link_libraries(
+ NorthstarLauncher
+ PRIVATE shlwapi.lib
+ kernel32.lib
+ user32.lib
+ gdi32.lib
+ winspool.lib
+ comdlg32.lib
+ advapi32.lib
+ shell32.lib
+ ole32.lib
+ oleaut32.lib
+ uuid.lib
+ odbc32.lib
+ odbccp32.lib
+ WS2_32.lib
+ )
-set_target_properties(NorthstarLauncher PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${NS_BINARY_DIR}
- LINK_FLAGS "/MANIFEST:NO /DEBUG /STACK:8000000"
-)
+set_target_properties(
+ NorthstarLauncher PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${NS_BINARY_DIR} LINK_FLAGS
+ "/MANIFEST:NO /DEBUG /STACK:8000000"
+ )
diff --git a/primedev/Northstar.cmake b/primedev/Northstar.cmake
index 69db3d4e..50b6adfd 100644
--- a/primedev/Northstar.cmake
+++ b/primedev/Northstar.cmake
@@ -4,179 +4,187 @@ find_package(minhook REQUIRED)
find_package(libcurl REQUIRED)
find_package(minizip REQUIRED)
-add_library(NorthstarDLL SHARED
- "resources.rc"
- "client/audio.cpp"
- "client/audio.h"
- "client/chatcommand.cpp"
- "client/clientauthhooks.cpp"
- "client/clientruihooks.cpp"
- "client/clientvideooverrides.cpp"
- "client/debugoverlay.cpp"
- "client/demofixes.cpp"
- "client/diskvmtfixes.cpp"
- "client/languagehooks.cpp"
- "client/latencyflex.cpp"
- "client/localchatwriter.cpp"
- "client/localchatwriter.h"
- "client/modlocalisation.cpp"
- "client/r2client.cpp"
- "client/r2client.h"
- "client/rejectconnectionfixes.cpp"
- "config/profile.cpp"
- "config/profile.h"
- "core/convar/concommand.cpp"
- "core/convar/concommand.h"
- "core/convar/convar.cpp"
- "core/convar/convar.h"
- "core/convar/cvar.cpp"
- "core/convar/cvar.h"
- "core/filesystem/filesystem.cpp"
- "core/filesystem/filesystem.h"
- "core/filesystem/rpakfilesystem.cpp"
- "core/filesystem/rpakfilesystem.h"
- "core/math/bitbuf.h"
- "core/math/bits.cpp"
- "core/math/bits.h"
- "core/math/color.cpp"
- "core/math/color.h"
- "core/math/vector.h"
- "core/hooks.cpp"
- "core/hooks.h"
- "core/macros.h"
- "core/memalloc.cpp"
- "core/memalloc.h"
- "core/memory.cpp"
- "core/memory.h"
- "core/sourceinterface.cpp"
- "core/sourceinterface.h"
- "core/structs.h"
- "core/tier0.cpp"
- "core/tier0.h"
- "dedicated/dedicated.cpp"
- "dedicated/dedicated.h"
- "dedicated/dedicatedlogtoclient.cpp"
- "dedicated/dedicatedlogtoclient.h"
- "dedicated/dedicatedmaterialsystem.cpp"
- "engine/host.cpp"
- "engine/hoststate.cpp"
- "engine/hoststate.h"
- "engine/r2engine.cpp"
- "engine/r2engine.h"
- "engine/runframe.cpp"
- "logging/crashhandler.cpp"
- "logging/crashhandler.h"
- "logging/logging.cpp"
- "logging/logging.h"
- "logging/loghooks.cpp"
- "logging/loghooks.h"
- "logging/sourceconsole.cpp"
- "logging/sourceconsole.h"
- "masterserver/masterserver.cpp"
- "masterserver/masterserver.h"
- "mods/autodownload/moddownloader.h"
- "mods/autodownload/moddownloader.cpp"
- "mods/compiled/kb_act.cpp"
- "mods/compiled/modkeyvalues.cpp"
- "mods/compiled/modpdef.cpp"
- "mods/compiled/modscriptsrson.cpp"
- "mods/modmanager.cpp"
- "mods/modmanager.h"
- "mods/modsavefiles.cpp"
- "mods/modsavefiles.h"
- "plugins/plugin_abi.h"
- "plugins/pluginbackend.cpp"
- "plugins/pluginbackend.h"
- "plugins/plugins.cpp"
- "plugins/plugins.h"
- "scripts/client/clientchathooks.cpp"
- "scripts/client/cursorposition.cpp"
- "scripts/client/scriptbrowserhooks.cpp"
- "scripts/client/scriptmainmenupromos.cpp"
- "scripts/client/scriptmodmenu.cpp"
- "scripts/client/scriptoriginauth.cpp"
- "scripts/client/scriptserverbrowser.cpp"
- "scripts/client/scriptservertoclientstringcommand.cpp"
- "scripts/server/miscserverfixes.cpp"
- "scripts/server/miscserverscript.cpp"
- "scripts/server/scriptuserinfo.cpp"
- "scripts/scriptdatatables.cpp"
- "scripts/scripthttprequesthandler.cpp"
- "scripts/scripthttprequesthandler.h"
- "scripts/scriptjson.cpp"
- "scripts/scriptjson.h"
- "scripts/scriptutility.cpp"
- "server/auth/bansystem.cpp"
- "server/auth/bansystem.h"
- "server/auth/serverauthentication.cpp"
- "server/auth/serverauthentication.h"
- "server/alltalk.cpp"
- "server/buildainfile.cpp"
- "server/r2server.cpp"
- "server/r2server.h"
- "server/serverchathooks.cpp"
- "server/serverchathooks.h"
- "server/servernethooks.cpp"
- "server/serverpresence.cpp"
- "server/serverpresence.h"
- "shared/exploit_fixes/exploitfixes.cpp"
- "shared/exploit_fixes/exploitfixes_lzss.cpp"
- "shared/exploit_fixes/exploitfixes_utf8parser.cpp"
- "shared/exploit_fixes/ns_limits.cpp"
- "shared/exploit_fixes/ns_limits.h"
- "shared/keyvalues.cpp"
- "shared/keyvalues.h"
- "shared/maxplayers.cpp"
- "shared/maxplayers.h"
- "shared/misccommands.cpp"
- "shared/misccommands.h"
- "shared/playlist.cpp"
- "shared/playlist.h"
- "squirrel/squirrel.cpp"
- "squirrel/squirrel.h"
- "squirrel/squirrelautobind.cpp"
- "squirrel/squirrelautobind.h"
- "squirrel/squirrelclasstypes.h"
- "squirrel/squirreldatatypes.h"
- "util/printcommands.cpp"
- "util/printcommands.h"
- "util/printmaps.cpp"
- "util/printmaps.h"
- "util/utils.cpp"
- "util/utils.h"
- "util/version.cpp"
- "util/version.h"
- "util/wininfo.cpp"
- "util/wininfo.h"
- "dllmain.cpp"
- "dllmain.h"
- "ns_version.h"
-)
+add_library(
+ NorthstarDLL SHARED
+ "resources.rc"
+ "client/audio.cpp"
+ "client/audio.h"
+ "client/chatcommand.cpp"
+ "client/clientauthhooks.cpp"
+ "client/clientruihooks.cpp"
+ "client/clientvideooverrides.cpp"
+ "client/debugoverlay.cpp"
+ "client/demofixes.cpp"
+ "client/diskvmtfixes.cpp"
+ "client/languagehooks.cpp"
+ "client/latencyflex.cpp"
+ "client/localchatwriter.cpp"
+ "client/localchatwriter.h"
+ "client/modlocalisation.cpp"
+ "client/r2client.cpp"
+ "client/r2client.h"
+ "client/rejectconnectionfixes.cpp"
+ "config/profile.cpp"
+ "config/profile.h"
+ "core/convar/concommand.cpp"
+ "core/convar/concommand.h"
+ "core/convar/convar.cpp"
+ "core/convar/convar.h"
+ "core/convar/cvar.cpp"
+ "core/convar/cvar.h"
+ "core/filesystem/filesystem.cpp"
+ "core/filesystem/filesystem.h"
+ "core/filesystem/rpakfilesystem.cpp"
+ "core/filesystem/rpakfilesystem.h"
+ "core/math/bitbuf.h"
+ "core/math/bits.cpp"
+ "core/math/bits.h"
+ "core/math/color.cpp"
+ "core/math/color.h"
+ "core/math/vector.h"
+ "core/hooks.cpp"
+ "core/hooks.h"
+ "core/macros.h"
+ "core/memalloc.cpp"
+ "core/memalloc.h"
+ "core/memory.cpp"
+ "core/memory.h"
+ "core/sourceinterface.cpp"
+ "core/sourceinterface.h"
+ "core/structs.h"
+ "core/tier0.cpp"
+ "core/tier0.h"
+ "dedicated/dedicated.cpp"
+ "dedicated/dedicated.h"
+ "dedicated/dedicatedlogtoclient.cpp"
+ "dedicated/dedicatedlogtoclient.h"
+ "dedicated/dedicatedmaterialsystem.cpp"
+ "engine/host.cpp"
+ "engine/hoststate.cpp"
+ "engine/hoststate.h"
+ "engine/r2engine.cpp"
+ "engine/r2engine.h"
+ "engine/runframe.cpp"
+ "logging/crashhandler.cpp"
+ "logging/crashhandler.h"
+ "logging/logging.cpp"
+ "logging/logging.h"
+ "logging/loghooks.cpp"
+ "logging/loghooks.h"
+ "logging/sourceconsole.cpp"
+ "logging/sourceconsole.h"
+ "masterserver/masterserver.cpp"
+ "masterserver/masterserver.h"
+ "mods/autodownload/moddownloader.h"
+ "mods/autodownload/moddownloader.cpp"
+ "mods/compiled/kb_act.cpp"
+ "mods/compiled/modkeyvalues.cpp"
+ "mods/compiled/modpdef.cpp"
+ "mods/compiled/modscriptsrson.cpp"
+ "mods/modmanager.cpp"
+ "mods/modmanager.h"
+ "mods/modsavefiles.cpp"
+ "mods/modsavefiles.h"
+ "plugins/plugin_abi.h"
+ "plugins/pluginbackend.cpp"
+ "plugins/pluginbackend.h"
+ "plugins/plugins.cpp"
+ "plugins/plugins.h"
+ "scripts/client/clientchathooks.cpp"
+ "scripts/client/cursorposition.cpp"
+ "scripts/client/scriptbrowserhooks.cpp"
+ "scripts/client/scriptmainmenupromos.cpp"
+ "scripts/client/scriptmodmenu.cpp"
+ "scripts/client/scriptoriginauth.cpp"
+ "scripts/client/scriptserverbrowser.cpp"
+ "scripts/client/scriptservertoclientstringcommand.cpp"
+ "scripts/server/miscserverfixes.cpp"
+ "scripts/server/miscserverscript.cpp"
+ "scripts/server/scriptuserinfo.cpp"
+ "scripts/scriptdatatables.cpp"
+ "scripts/scripthttprequesthandler.cpp"
+ "scripts/scripthttprequesthandler.h"
+ "scripts/scriptjson.cpp"
+ "scripts/scriptjson.h"
+ "scripts/scriptutility.cpp"
+ "server/auth/bansystem.cpp"
+ "server/auth/bansystem.h"
+ "server/auth/serverauthentication.cpp"
+ "server/auth/serverauthentication.h"
+ "server/alltalk.cpp"
+ "server/buildainfile.cpp"
+ "server/r2server.cpp"
+ "server/r2server.h"
+ "server/serverchathooks.cpp"
+ "server/serverchathooks.h"
+ "server/servernethooks.cpp"
+ "server/serverpresence.cpp"
+ "server/serverpresence.h"
+ "shared/exploit_fixes/exploitfixes.cpp"
+ "shared/exploit_fixes/exploitfixes_lzss.cpp"
+ "shared/exploit_fixes/exploitfixes_utf8parser.cpp"
+ "shared/exploit_fixes/ns_limits.cpp"
+ "shared/exploit_fixes/ns_limits.h"
+ "shared/keyvalues.cpp"
+ "shared/keyvalues.h"
+ "shared/maxplayers.cpp"
+ "shared/maxplayers.h"
+ "shared/misccommands.cpp"
+ "shared/misccommands.h"
+ "shared/playlist.cpp"
+ "shared/playlist.h"
+ "squirrel/squirrel.cpp"
+ "squirrel/squirrel.h"
+ "squirrel/squirrelautobind.cpp"
+ "squirrel/squirrelautobind.h"
+ "squirrel/squirrelclasstypes.h"
+ "squirrel/squirreldatatypes.h"
+ "util/printcommands.cpp"
+ "util/printcommands.h"
+ "util/printmaps.cpp"
+ "util/printmaps.h"
+ "util/utils.cpp"
+ "util/utils.h"
+ "util/version.cpp"
+ "util/version.h"
+ "util/wininfo.cpp"
+ "util/wininfo.h"
+ "dllmain.cpp"
+ "dllmain.h"
+ "ns_version.h"
+ )
-target_link_libraries(NorthstarDLL PRIVATE
- minhook
- libcurl
- minizip
- WS2_32.lib
- Crypt32.lib
- Cryptui.lib
- dbghelp.lib
- Wldap32.lib
- Normaliz.lib
- Bcrypt.lib
- version.lib
-)
+target_link_libraries(
+ NorthstarDLL
+ PRIVATE minhook
+ libcurl
+ minizip
+ WS2_32.lib
+ Crypt32.lib
+ Cryptui.lib
+ dbghelp.lib
+ Wldap32.lib
+ Normaliz.lib
+ Bcrypt.lib
+ version.lib
+ )
-target_precompile_headers(NorthstarDLL PRIVATE pch.h)
+target_precompile_headers(
+ NorthstarDLL
+ PRIVATE
+ pch.h
+ )
-target_compile_definitions(NorthstarDLL PRIVATE
- UNICODE
- _UNICODE
- CURL_STATICLIB
-)
+target_compile_definitions(
+ NorthstarDLL
+ PRIVATE UNICODE
+ _UNICODE
+ CURL_STATICLIB
+ )
-set_target_properties(NorthstarDLL PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${NS_BINARY_DIR}
- OUTPUT_NAME Northstar
- LINK_FLAGS "/MANIFEST:NO /DEBUG"
-)
+set_target_properties(
+ NorthstarDLL
+ PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${NS_BINARY_DIR}
+ OUTPUT_NAME Northstar
+ LINK_FLAGS "/MANIFEST:NO /DEBUG"
+ )
diff --git a/primedev/WSockProxy.cmake b/primedev/WSockProxy.cmake
index 84338bc7..017e358a 100644
--- a/primedev/WSockProxy.cmake
+++ b/primedev/WSockProxy.cmake
@@ -2,44 +2,48 @@
find_package(minhook REQUIRED)
-add_library(loader_wsock32_proxy SHARED
- "wsockproxy/dllmain.cpp"
- "wsockproxy/loader.cpp"
- "wsockproxy/loader.h"
- "wsockproxy/wsock32.asm"
- "wsockproxy/wsock32.def"
-)
+add_library(
+ loader_wsock32_proxy SHARED
+ "wsockproxy/dllmain.cpp"
+ "wsockproxy/loader.cpp"
+ "wsockproxy/loader.h"
+ "wsockproxy/wsock32.asm"
+ "wsockproxy/wsock32.def"
+ )
-target_link_libraries(loader_wsock32_proxy PRIVATE
- minhook
- mswsock.lib
- ws2_32.lib
- ShLwApi.lib
- imagehlp.lib
- dbghelp.lib
- kernel32.lib
- user32.lib
- gdi32.lib
- winspool.lib
- comdlg32.lib
- advapi32.lib
- shell32.lib
- ole32.lib
- oleaut32.lib
- uuid.lib
- odbc32.lib
- odbccp32.lib
-)
+target_link_libraries(
+ loader_wsock32_proxy
+ PRIVATE minhook
+ mswsock.lib
+ ws2_32.lib
+ ShLwApi.lib
+ imagehlp.lib
+ dbghelp.lib
+ kernel32.lib
+ user32.lib
+ gdi32.lib
+ winspool.lib
+ comdlg32.lib
+ advapi32.lib
+ shell32.lib
+ ole32.lib
+ oleaut32.lib
+ uuid.lib
+ odbc32.lib
+ odbccp32.lib
+ )
-target_precompile_headers(loader_wsock32_proxy PRIVATE wsockproxy/pch.h)
+target_precompile_headers(
+ loader_wsock32_proxy
+ PRIVATE
+ wsockproxy/pch.h
+ )
-target_compile_definitions(loader_wsock32_proxy PRIVATE
- UNICODE
- _UNICODE
-)
+target_compile_definitions(loader_wsock32_proxy PRIVATE UNICODE _UNICODE)
-set_target_properties(loader_wsock32_proxy PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${NS_BINARY_DIR}/bin/x64_retail
- OUTPUT_NAME wsock32
- LINK_FLAGS "/MANIFEST:NO /DEBUG"
-)
+set_target_properties(
+ loader_wsock32_proxy
+ PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${NS_BINARY_DIR}/bin/x64_retail
+ OUTPUT_NAME wsock32
+ LINK_FLAGS "/MANIFEST:NO /DEBUG"
+ )
diff --git a/primedev/cmake/Findlibcurl.cmake b/primedev/cmake/Findlibcurl.cmake
index 6e158b95..3f059665 100644
--- a/primedev/cmake/Findlibcurl.cmake
+++ b/primedev/cmake/Findlibcurl.cmake
@@ -1,18 +1,47 @@
+if(NOT libcurl_FOUND)
+ check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/libcurl)
-if (NOT libcurl_FOUND)
- check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/libcurl)
+ set(BUILD_SHARED_LIBS
+ OFF
+ CACHE BOOL "Build shared libraries"
+ )
+ set(BUILD_CURL_EXE
+ OFF
+ CACHE BOOL "Build curl EXE"
+ )
+ set(HTTP_ONLY
+ ON
+ CACHE BOOL "Only build HTTP and HTTPS"
+ )
+ set(CURL_ENABLE_SSL
+ ON
+ CACHE BOOL "Enable SSL support"
+ )
+ set(CURL_USE_OPENSSL
+ OFF
+ CACHE BOOL "Disable OpenSSL"
+ )
+ set(CURL_USE_LIBSSH2
+ OFF
+ CACHE BOOL "Disable libSSH2"
+ )
+ set(CURL_USE_SCHANNEL
+ ON
+ CACHE BOOL "Enable Secure Channel"
+ )
+ set(CURL_CA_BUNDLE
+ "none"
+ CACHE STRING "Disable CA Bundle"
+ )
+ set(CURL_CA_PATH
+ "none"
+ CACHE STRING "Disable CA Path"
+ )
- set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries")
- set(BUILD_CURL_EXE OFF CACHE BOOL "Build curl EXE")
- set(HTTP_ONLY ON CACHE BOOL "Only build HTTP and HTTPS")
- set(CURL_ENABLE_SSL ON CACHE BOOL "Enable SSL support")
- set(CURL_USE_OPENSSL OFF CACHE BOOL "Disable OpenSSL")
- set(CURL_USE_LIBSSH2 OFF CACHE BOOL "Disable libSSH2")
- set(CURL_USE_SCHANNEL ON CACHE BOOL "Enable Secure Channel")
- set(CURL_CA_BUNDLE "none" CACHE STRING "Disable CA Bundle")
- set(CURL_CA_PATH "none" CACHE STRING "Disable CA Path")
-
- add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/libcurl libcurl)
- set(libcurl_FOUND 1 PARENT_SCOPE)
+ add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/libcurl libcurl)
+ set(libcurl_FOUND
+ 1
+ PARENT_SCOPE
+ )
endif()
diff --git a/primedev/cmake/Findminhook.cmake b/primedev/cmake/Findminhook.cmake
index aaf66c92..155232a0 100644
--- a/primedev/cmake/Findminhook.cmake
+++ b/primedev/cmake/Findminhook.cmake
@@ -1,7 +1,6 @@
-
if(NOT minhook_FOUND)
- check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minhook)
+ check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minhook)
- add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minhook minhook)
- set(minhook_FOUND 1)
+ add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minhook minhook)
+ set(minhook_FOUND 1)
endif()
diff --git a/primedev/cmake/Findminizip.cmake b/primedev/cmake/Findminizip.cmake
index ab48656a..a6d0f914 100644
--- a/primedev/cmake/Findminizip.cmake
+++ b/primedev/cmake/Findminizip.cmake
@@ -1,16 +1,38 @@
-
if(NOT minizip_FOUND)
- check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minizip)
+ check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minizip)
- set(MZ_ZLIB ON CACHE BOOL "Enable ZLIB compression, needed for DEFLATE")
- set(MZ_BZIP2 OFF CACHE BOOL "Disable BZIP2 compression")
- set(MZ_LZMA OFF CACHE BOOL "Disable LZMA & XZ compression")
- set(MZ_PKCRYPT OFF CACHE BOOL "Disable PKWARE traditional encryption")
- set(MZ_WZAES OFF CACHE BOOL "Disable WinZIP AES encryption")
- set(MZ_ZSTD OFF CACHE BOOL "Disable ZSTD compression")
- set(MZ_SIGNING OFF CACHE BOOL "Disable zip signing support")
+ set(MZ_ZLIB
+ ON
+ CACHE BOOL "Enable ZLIB compression, needed for DEFLATE"
+ )
+ set(MZ_BZIP2
+ OFF
+ CACHE BOOL "Disable BZIP2 compression"
+ )
+ set(MZ_LZMA
+ OFF
+ CACHE BOOL "Disable LZMA & XZ compression"
+ )
+ set(MZ_PKCRYPT
+ OFF
+ CACHE BOOL "Disable PKWARE traditional encryption"
+ )
+ set(MZ_WZAES
+ OFF
+ CACHE BOOL "Disable WinZIP AES encryption"
+ )
+ set(MZ_ZSTD
+ OFF
+ CACHE BOOL "Disable ZSTD compression"
+ )
+ set(MZ_SIGNING
+ OFF
+ CACHE BOOL "Disable zip signing support"
+ )
- add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minizip minizip)
- set(minizip_FOUND 1 PARENT_SCOPE)
+ add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/minizip minizip)
+ set(minizip_FOUND
+ 1
+ PARENT_SCOPE
+ )
endif()
-
diff --git a/primedev/cmake/Findspdlog.cmake b/primedev/cmake/Findspdlog.cmake
index 81596762..660e1950 100644
--- a/primedev/cmake/Findspdlog.cmake
+++ b/primedev/cmake/Findspdlog.cmake
@@ -1,7 +1,6 @@
-
if(NOT spdlog_FOUND)
- check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/spdlog)
+ check_init_submodule(${PROJECT_SOURCE_DIR}/primedev/thirdparty/spdlog)
- add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/spdlog spdlog)
- set(spdlog_FOUND 1)
+ add_subdirectory(${PROJECT_SOURCE_DIR}/primedev/thirdparty/spdlog spdlog)
+ set(spdlog_FOUND 1)
endif()
diff --git a/primedev/cmake/utils.cmake b/primedev/cmake/utils.cmake
index d8450551..80a2288d 100644
--- a/primedev/cmake/utils.cmake
+++ b/primedev/cmake/utils.cmake
@@ -1,24 +1,43 @@
-
# Check if a dependency exist before trying to init git submodules
function(check_init_submodule path)
- file(GLOB DIR_CONTENT "${path}/*")
- list(LENGTH DIR_CONTENT CONTENT_COUNT)
- if (CONTENT_COUNT EQUAL 0)
- if (NOT EXISTS "${PROJECT_SOURCE_DIR}/.git")
+ file(
+ GLOB
+ DIR_CONTENT
+ "${path}/*"
+ )
+ list(
+ LENGTH
+ DIR_CONTENT
+ CONTENT_COUNT
+ )
+ if(CONTENT_COUNT
+ EQUAL
+ 0
+ )
+ if(NOT
+ EXISTS
+ "${PROJECT_SOURCE_DIR}/.git"
+ )
message(FATAL_ERROR "Failed to find third party dependency in '${path}'")
endif()
find_package(Git QUIET)
- if (NOT Git_FOUND)
+ if(NOT Git_FOUND)
message(FATAL_ERROR "Failed to find Git, third party dependency could not be setup at `${path}")
endif()
message(STATUS "Setting up dependencies as git submodules")
- execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- RESULT_VARIABLE GIT_SUBMOD_RESULT)
+ execute_process(
+ COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ RESULT_VARIABLE GIT_SUBMOD_RESULT
+ )
- if(NOT GIT_SUBMOD_RESULT EQUAL "0")
+ if(NOT
+ GIT_SUBMOD_RESULT
+ EQUAL
+ "0"
+ )
message(FATAL_ERROR "Initializing Git submodules failed with ${GIT_SUBMOD_RESULT}")
endif()
endif()