aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt33
-rw-r--r--cmake.toml11
2 files changed, 15 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d324bbf..358008c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,14 +53,12 @@ FetchContent_MakeAvailable(fmt)
set(CMKR_TARGET soyuz)
set(soyuz_SOURCES "")
-if(WIN32) # windows
- list(APPEND soyuz_SOURCES
- "soyuz/library.cc"
- "soyuz/soyuz.cc"
- "soyuz/tray.cc"
- "resource/resource.rc"
- )
-endif()
+list(APPEND soyuz_SOURCES
+ "soyuz/library.cc"
+ "soyuz/soyuz.cc"
+ "soyuz/tray.cc"
+ "resource/resource.rc"
+)
list(APPEND soyuz_SOURCES
cmake.toml
@@ -80,18 +78,11 @@ endif()
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${soyuz_SOURCES})
-target_compile_features(soyuz PRIVATE
- cxx_std_20
- cxx_return_type_deduction
+target_compile_options(soyuz PRIVATE
+ "/W4"
+ "/WX"
)
-if(MSVC) # msvc
- target_compile_options(soyuz PRIVATE
- "/W4"
- "/WX"
- )
-endif()
-
target_include_directories(soyuz PRIVATE
"include/"
)
@@ -101,12 +92,12 @@ target_link_libraries(soyuz PRIVATE
)
set_target_properties(soyuz PROPERTIES
+ CMAKE_CXX_EXTENSIONS
+ OFF
CXX_STANDARD
- 20
+ 23
CXX_STANDARD_REQUIRED
ON
- CMAKE_CXX_EXTENSIONS
- OFF
WIN32_EXECUTABLE
ON
)
diff --git a/cmake.toml b/cmake.toml
index 9817c22..7495155 100644
--- a/cmake.toml
+++ b/cmake.toml
@@ -10,18 +10,13 @@ version = "1.1.2"
description = "🚀 Discord RPC Blocker for Lunar Client"
languages = ["CXX", "C"]
-[conditions]
-windows = "WIN32"
-msvc = "MSVC"
-
[fetch-content]
fmt = { git = "https://github.com/fmtlib/fmt", tag = "8.1.1" }
[target.soyuz]
type = "executable"
-windows.sources = ["soyuz/*.cc", "resource/*.rc"]
+sources = ["soyuz/*.cc", "resource/*.rc"]
private-include-directories = ["include/"]
-properties = { CXX_STANDARD = "20", CXX_STANDARD_REQUIRED = true, CMAKE_CXX_EXTENSIONS = false, WIN32_EXECUTABLE = true }
-compile-features = ["cxx_std_20", "cxx_return_type_deduction"]
-msvc.compile-options = ["/W4", "/WX"] # /Wall
+properties = { CMAKE_CXX_EXTENSIONS = false, CXX_STANDARD = "23", CXX_STANDARD_REQUIRED = true, WIN32_EXECUTABLE = true }
+compile-options = ["/W4", "/WX"]
private-link-libraries = ["fmt::fmt"]