mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-18 01:19:45 +08:00
CMake: Improve WIN32_MSVC_NAMING when using other compilers
This commit is contained in:
@@ -287,7 +287,7 @@ function(wx_set_target_properties target_name)
|
||||
endif()
|
||||
# For compatibility with MSVS project files and makefile.vc, use arch
|
||||
# suffix for non-x86 (including x86_64) DLLs.
|
||||
if(MSVC AND wxARCH_SUFFIX)
|
||||
if(WIN32_MSVC_NAMING AND wxARCH_SUFFIX)
|
||||
# This one already includes the leading underscore, so don't add another one.
|
||||
wx_string_append(dll_suffix "${wxARCH_SUFFIX}")
|
||||
endif()
|
||||
@@ -301,7 +301,7 @@ function(wx_set_target_properties target_name)
|
||||
endif()
|
||||
|
||||
set(lib_prefix "lib")
|
||||
if(MSVC OR (WIN32 AND wxBUILD_SHARED))
|
||||
if(WIN32_MSVC_NAMING OR (WIN32 AND wxBUILD_SHARED))
|
||||
set(lib_prefix)
|
||||
elseif (CYGWIN AND wxBUILD_SHARED)
|
||||
set(lib_prefix "cyg")
|
||||
@@ -364,7 +364,7 @@ function(wx_set_target_properties target_name)
|
||||
target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=1 wxUSE_BASE=0)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
if(MSVC)
|
||||
# Suppress deprecation warnings for standard library calls
|
||||
target_compile_definitions(${target_name} PRIVATE
|
||||
_CRT_SECURE_NO_DEPRECATE=1
|
||||
@@ -643,7 +643,7 @@ macro(wx_set_builtin_target_ouput_name target target_name)
|
||||
endif()
|
||||
|
||||
set(lib_prefix "lib")
|
||||
if(MSVC OR (WIN32 AND wxBUILD_SHARED))
|
||||
if(WIN32_MSVC_NAMING OR (WIN32 AND wxBUILD_SHARED))
|
||||
set(lib_prefix)
|
||||
elseif (CYGWIN AND wxBUILD_SHARED)
|
||||
set(lib_prefix "cyg")
|
||||
|
||||
@@ -47,9 +47,7 @@ endif()
|
||||
|
||||
if(WIN32_MSVC_NAMING)
|
||||
include(build/cmake/build_cfg.cmake)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
else()
|
||||
# Write wx-config
|
||||
include(build/cmake/config.cmake)
|
||||
endif()
|
||||
|
||||
@@ -88,9 +88,9 @@ set(wxBUILD_INSTALL_LIBRARY_DIR "" CACHE STRING "override default sub-directory
|
||||
mark_as_advanced(wxBUILD_INSTALL_LIBRARY_DIR)
|
||||
set(wxBUILD_INSTALL_ARCHIVE_DIR "" CACHE STRING "override default sub-directory to install archive files")
|
||||
mark_as_advanced(wxBUILD_INSTALL_ARCHIVE_DIR)
|
||||
wx_option(wxBUILD_INSTALL_PLATFORM_SUBDIR "platform specific sub-directory (MSVC-naming)" ON)
|
||||
wx_option(wxBUILD_INSTALL_PLATFORM_SUBDIR "use platform specific sub-directory (MSVC-naming)" ON)
|
||||
mark_as_advanced(wxBUILD_INSTALL_PLATFORM_SUBDIR)
|
||||
wx_option(wxBUILD_INSTALL_PDB "install pdb files in the runtime direcotry (MSVC)" OFF)
|
||||
wx_option(wxBUILD_INSTALL_PDB "install pdb files in the runtime directory (MSVC-naming)" OFF)
|
||||
mark_as_advanced(wxBUILD_INSTALL_PDB)
|
||||
|
||||
# Use the MSVC/makefile naming convention, or the configure naming convention,
|
||||
|
||||
Reference in New Issue
Block a user