Build demos project to demos_x64 or demos_x86 on windows and linux

This commit is contained in:
baldurk
2019-05-23 10:51:58 +01:00
parent e0275bc92b
commit eb6f04f941
2 changed files with 14 additions and 2 deletions
+7 -1
View File
@@ -56,10 +56,16 @@ add_executable(demos ${SRC} ${VULKAN_SRC} ${OPENGL_SRC})
install(TARGETS demos DESTINATION .)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BIN_SUFFIX "x64")
else()
set(BIN_SUFFIX "x86")
endif()
target_include_directories(demos
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/vk/official
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(demos PRIVATE -DVK_USE_PLATFORM_XCB_KHR=1)
target_link_libraries(demos PRIVATE -lX11 -lxcb -lX11-xcb ${CMAKE_DL_LIBS})
set_target_properties(demos PROPERTIES OUTPUT_NAME demos_x64)
set_target_properties(demos PROPERTIES OUTPUT_NAME demos_${BIN_SUFFIX})
+7 -1
View File
@@ -23,6 +23,7 @@
<ProjectGuid>{EC8C6087-E99E-44B3-B8DC-3C9FE7907F47}</ProjectGuid>
<RootNamespace>demos</RootNamespace>
<ProjectName>demos</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
@@ -42,12 +43,17 @@
<PropertyGroup>
<OutDir>$(SolutionDir)</OutDir>
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\</IntDir>
<TargetName>$(ProjectName)_$(Platform)</TargetName>
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<ExcludePath>$(ExcludePath)</ExcludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='x64'">
<TargetName>$(ProjectName)_x64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='Win32'">
<TargetName>$(ProjectName)_x86</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
<ClCompile>
<PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>