Skip to content

Commit 72ff06e

Browse files
Update CMakeLists.txt
1 parent b762f2b commit 72ff06e

1 file changed

Lines changed: 3 additions & 17 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
cmake_minimum_required(VERSION 3.15)
23
project(SemiEuler VERSION 0.9.0 LANGUAGES CXX)
34

@@ -68,26 +69,11 @@ if (WIN32)
6869
target_link_libraries(SemiEuler PRIVATE raylib opengl32 gdi32 winmm ws2_32)
6970

7071
if (MSVC)
71-
# Check for system libraries (Windows SDK)
72-
find_library(OPENGL32_LIB opengl32)
73-
find_library(GDI32_LIB gdi32)
74-
find_library(WINMM_LIB winmm)
75-
find_library(WS2_32_LIB ws2_32)
76-
77-
if (NOT OPENGL32_LIB OR NOT GDI32_LIB OR NOT WINMM_LIB OR NOT WS2_32_LIB)
78-
message(WARNING "Missing MSVC system libraries. Running setup.sh to install dependencies...")
79-
execute_process(
80-
COMMAND bash ${CMAKE_SOURCE_DIR}/setup.sh
81-
RESULT_VARIABLE setup_result
82-
)
83-
if (NOT setup_result EQUAL 0)
84-
message(FATAL_ERROR "setup.sh failed. Please run it manually with administrator privileges.")
85-
endif()
86-
endif()
87-
72+
# On MSVC, system libs are provided by the Windows SDK — no setup.sh needed
8873
target_compile_options(SemiEuler PRIVATE /O2)
8974
target_link_options(SemiEuler PRIVATE /INCREMENTAL:NO)
9075
else()
76+
# MinGW
9177
target_link_options(SemiEuler PRIVATE -s)
9278
endif()
9379

0 commit comments

Comments
 (0)