summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-22 22:45:48 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-22 22:45:48 +0100
commit628940923846b9f3341369def9b262c1d0f70605 (patch)
tree48c3b5d5d186dc9e362134d575fd23cb92ca1490
parent7ce9e7551738c6e8676b7dc513b12c2bf5ec60f7 (diff)
add icon
-rw-r--r--CMakeLists.txt13
-rw-r--r--editor/CMakeLists.txt3
-rw-r--r--main/floormat.icobin0 -> 12376 bytes
-rw-r--r--main/floormat.rc2
4 files changed, 15 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa42d157..d8e2c929 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
-project(floormat)
+project(floormat C CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_DEFAULT 23)
@@ -83,6 +83,13 @@ function(fm_load_userconfig)
endif()
endfunction()
+if(WIN32)
+ if(MSVC)
+ set(CMAKE_RC_FLAGS "/nologo /DWIN32")
+ endif()
+ enable_language(RC)
+endif()
+
if(NOT "$ENV{FLOORMAT_NO_USERCONFIG}" AND NOT FLOORMAT_NO_USERCONFIG)
fm_load_userconfig()
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE)
@@ -132,9 +139,9 @@ set_directory_properties(PROPERTIES INTERFACE_CORRADE_CXX_STANDARD ${CMAKE_CXX_S
add_subdirectory(external)
if(MSVC)
- add_definitions(/FI"compat/prelude.hpp")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FIcompat/prelude.hpp")
else()
- add_definitions(-include compat/prelude.hpp)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include compat/prelude.hpp")
endif()
add_definitions(
diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt
index 2b42e15d..30b6ce5a 100644
--- a/editor/CMakeLists.txt
+++ b/editor/CMakeLists.txt
@@ -13,6 +13,9 @@ link_libraries(MagnumIntegration::ImGui fmt::fmt)
link_libraries(floormat-main floormat-loader floormat-serialize)
add_executable(${self} "${sources}" "${res}")
+if(WIN32)
+ target_sources(${self} PRIVATE "../main/floormat.rc")
+endif()
if(FLOORMAT_PRECOMPILED-HEADERS)
target_precompile_headers(${self} PRIVATE precomp.hpp)
diff --git a/main/floormat.ico b/main/floormat.ico
new file mode 100644
index 00000000..a35cc8f6
--- /dev/null
+++ b/main/floormat.ico
Binary files differ
diff --git a/main/floormat.rc b/main/floormat.rc
new file mode 100644
index 00000000..e994bd1a
--- /dev/null
+++ b/main/floormat.rc
@@ -0,0 +1,2 @@
+#include <windows.h>
+IDI_ICON1 ICON DISCARDABLE "floormat.ico"