55 lines
1.8 KiB
Diff
55 lines
1.8 KiB
Diff
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -204,7 +204,7 @@
|
|
|
|
find_package(PNG REQUIRED)
|
|
|
|
-if(WIN32)
|
|
+if(MSVC)
|
|
if(VCPKG_BUILD)
|
|
find_package(SDL2 CONFIG REQUIRED)
|
|
find_library(SDL2IMAGE_LIBRARIES SDL2_image)
|
|
@@ -219,7 +219,7 @@
|
|
find_path(PHYSFS_INCLUDE_DIR NAMES physfs.h PATHS "${DEPENDENCY_FOLDER}/include/physfs")
|
|
endif(VCPKG_BUILD)
|
|
|
|
-else(WIN32)
|
|
+else(MSVC)
|
|
|
|
if (NOT EMSCRIPTEN)
|
|
if (VCPKG_BUILD)
|
|
@@ -249,7 +249,7 @@
|
|
pkg_search_module(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
|
|
endif()
|
|
endif(NOT EMSCRIPTEN)
|
|
-endif(WIN32)
|
|
+endif(MSVC)
|
|
set(HAVE_SDL TRUE)
|
|
|
|
option(IS_SUPERTUX_RELEASE "Build as official SuperTux release" OFF)
|
|
@@ -510,7 +510,7 @@
|
|
-DINSTALL_INC_DIR=include
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON)
|
|
|
|
-if(WIN32)
|
|
+if(MSVC)
|
|
add_library(squirrel_lib SHARED IMPORTED)
|
|
set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}squirrel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
|
set_target_properties(squirrel_lib PROPERTIES IMPORTED_IMPLIB "${SQUIRREL_PREFIX}/lib/squirrel${CMAKE_LINK_LIBRARY_SUFFIX}")
|
|
@@ -935,13 +935,13 @@
|
|
target_link_options(supertux2 PUBLIC -sEXPORTED_FUNCTIONS=['_main','_set_resolution','_save_config','_onDownloadProgress','_onDownloadFinished','_onDownloadError','_onDownloadAborted'] PUBLIC -sEXPORTED_RUNTIME_METHODS=['ccall','cwrap'] PUBLIC -sEXTRA_EXPORTED_RUNTIME_METHODS=['ccall','cwrap'])
|
|
endif(EMSCRIPTEN)
|
|
|
|
-if(WIN32 AND NOT VCPKG_BUILD)
|
|
+if(MSVC AND NOT VCPKG_BUILD)
|
|
## Copy dlls on windows
|
|
add_custom_command(TARGET supertux2_lib POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
"${DEPENDENCY_FOLDER}/dll"
|
|
$<TARGET_FILE_DIR:supertux2_lib>)
|
|
-endif(WIN32 AND NOT VCPKG_BUILD)
|
|
+endif(MSVC AND NOT VCPKG_BUILD)
|
|
|
|
## Link supertux binary with squirrel and other libraries
|
|
|