mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 07:35:38 +00:00
Improve CMake script for Windows builds
Enable multi-processor compilation in Visual Studio / NMake. Disable console in release builds (broken in CMake atm, you have to set linker /SUBSYSTEM:WINDOWS manually).
This commit is contained in:
parent
802aa50ad9
commit
e92a68fb46
|
@ -47,6 +47,8 @@ if(MSVC)
|
|||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") #multi-processor compilation
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") #multi-processor compilation
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@ -225,3 +227,15 @@ set(LIBRARY_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
|
|||
include_directories(${ES_INCLUDE_DIRS})
|
||||
add_executable(emulationstation ${ES_SOURCES} ${ES_HEADERS})
|
||||
target_link_libraries(emulationstation ${ES_LIBRARIES})
|
||||
|
||||
#special properties for windows builds
|
||||
if(MSVC)
|
||||
#show console in debug builds, but not in proper release builds
|
||||
#Note that up to CMake 2.8.10 this feature is broken: http://public.kitware.com/Bug/view.php?id=12566
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
|
||||
set_target_properties(emulationstation PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
|
||||
endif()
|
|
@ -43,23 +43,28 @@
|
|||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;USE_OPENGL_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>false</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>USE_OPENGL_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;USE_OPENGL_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>false</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<IncludePath>C:/Programmierung/Projekte/trunk_clean/freetype2/include;C:/Users/kr.ERPA/Documents/GitHub/FreeImage/Dist;C:\Users\kr.ERPA\Documents\GitHub\SDL-1.2.15\include;C:\Programmierung\Projekte\VPackNG\modules\boost-1.53.0\include;%(AdditionalLibraryDirectories);$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:/Programmierung/Projekte/trunk_clean/freetype2/lib;C:/Users/kr.ERPA/Documents/GitHub/FreeImage/Dist;C:\Users\kr.ERPA\Documents\GitHub\SDL-1.2.15\lib\x86;C:\Programmierung\Projekte\VPackNG\modules\boost-1.53.0\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
|
|
BIN
data/logo/bin2h.exe
Normal file
BIN
data/logo/bin2h.exe
Normal file
Binary file not shown.
BIN
src/EmulationStation.aps
Normal file
BIN
src/EmulationStation.aps
Normal file
Binary file not shown.
Loading…
Reference in a new issue