cmake: remove duplicate flags

also use the lighter elseif structure to reduce a bit the size of cmakefile
This commit is contained in:
Gregory Hainaut 2014-12-14 14:00:20 +01:00
parent 4773bcf0ea
commit a99f3ea321
16 changed files with 109 additions and 343 deletions

View File

@ -3,45 +3,27 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output CDVDiso) set(Output CDVDiso)
set(CommonFlags
-fvisibility=hidden
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(CDVDisoFinalFlags "")
set(CDVDisoFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(CDVDisoFinalFlags ${OptimizationFlags})
# add defines
set(CDVDisoFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(CDVDisoFinalFlags ${OptimizationFlags})
# add defines
set(CDVDisoFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# CDVDiso sources # CDVDiso sources
set(CDVDisoSources set(CDVDisoSources

View File

@ -4,7 +4,6 @@
set(Output CDVDlinuz) set(Output CDVDlinuz)
set(CommonFlags set(CommonFlags
-Wall
-D_LARGEFILE64_SOURCE -D_LARGEFILE64_SOURCE
) )
@ -14,29 +13,16 @@ set(OptimizationFlags
-fomit-frame-pointer -fomit-frame-pointer
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(CDVDlinuzFinalFlags ${CommonFlags})
set(CDVDlinuzFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(CDVDlinuzFinalFlags ${CommonFlags} ${OptimizationFlags})
# add defines
set(CDVDlinuzFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(CDVDlinuzFinalFlags ${CommonFlags} ${OptimizationFlags})
# add defines
set(CDVDlinuzFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# CDVDlinuz sources # CDVDlinuz sources
set(CDVDlinuzSources set(CDVDlinuzSources

View File

@ -3,45 +3,27 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output CDVDnull) set(Output CDVDnull)
set(CommonFlags
-fvisibility=hidden
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(CDVDnullFinalFlags "")
set(CDVDnullFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(CDVDnullFinalFlags ${OptimizationFlags})
# add defines
set(CDVDnullFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(CDVDnullFinalFlags ${OptimizationFlags})
# add defines
set(CDVDnullFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# CDVDnull sources # CDVDnull sources
set(CDVDnullSources set(CDVDnullSources

View File

@ -3,7 +3,7 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# make cdvdGigaherz # make cdvdGigaherz

View File

@ -3,44 +3,26 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output FWnull-0.7.0) set(Output FWnull-0.7.0)
set(CommonFlags
-fvisibility=hidden
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(FWnullFinalFlags "")
set(FWnullFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(FWnullFinalFlags ${OptimizationFlags})
# add defines
set(FWnullFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(FWnullFinalFlags ${OptimizationFlags})
# add defines
set(FWnullFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# FWnull sources # FWnull sources
set(FWnullSources set(FWnullSources

View File

@ -12,8 +12,6 @@ set(Output GSdx-0.1.16)
set(CommonFlags set(CommonFlags
-fno-operator-names # because Xbyak uses and()/xor()/or()/not() function -fno-operator-names # because Xbyak uses and()/xor()/or()/not() function
-mfpmath=sse -mfpmath=sse
#-Wstrict-aliasing # Allow to track strict aliasing issue.
-std=c++0x
-fno-strict-aliasing -fno-strict-aliasing
-Wno-unknown-pragmas -Wno-unknown-pragmas
-Wno-parentheses -Wno-parentheses
@ -26,19 +24,15 @@ set(OptimizationFlags
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -D_DEBUG -g -Wall) set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -D_DEBUG)
endif()
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} ${OptimizationFlags} -D_DEVEL)
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} ${OptimizationFlags} -D_DEVEL -g)
endif()
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} ${OptimizationFlags} -W) set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} ${OptimizationFlags} -W)
endif() endif()
if(XDG_STD) if(XDG_STD)

View File

@ -3,45 +3,27 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output GSnull) set(Output GSnull)
set(CommonFlags
-fvisibility=hidden
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(GSnullFinalFlags "")
set(GSnullFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(GSnullFinalFlags ${OptimizationFlags})
# add defines
set(GSnullFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(GSnullFinalFlags ${OptimizationFlags})
# add defines
set(GSnullFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# GSnull sources # GSnull sources
set(GSnullSources set(GSnullSources

View File

@ -3,44 +3,26 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output PADnull) set(Output PADnull)
set(CommonFlags
-fvisibility=hidden
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(PadNullFinalFlags "")
set(PadNullFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(PadNullFinalFlags ${OptimizationFlags})
# add defines
set(PadNullFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(PadNullFinalFlags ${OptimizationFlags})
# add defines
set(PadNullFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# PadNull sources # PadNull sources
set(PadNullSources set(PadNullSources

View File

@ -3,45 +3,27 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output SPU2null) set(Output SPU2null)
set(CommonFlags
-fvisibility=hidden
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(SPU2nullFinalFlags "")
set(SPU2nullFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(SPU2nullFinalFlags ${OptimizationFlags})
# add defines
set(SPU2nullFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(SPU2nullFinalFlags ${OptimizationFlags})
# add defines
set(SPU2nullFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# SPU2null sources # SPU2null sources
set(SPU2nullSources set(SPU2nullSources

View File

@ -3,45 +3,27 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output USBnull-0.7.0) set(Output USBnull-0.7.0)
set(CommonFlags
-fvisibility=hidden
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(USBnullFinalFlags "")
set(USBnullFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(USBnullFinalFlags ${OptimizationFlags})
# add defines
set(USBnullFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(USBnullFinalFlags ${OptimizationFlags})
# add defines
set(USBnullFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# USBnull sources # USBnull sources
set(USBnullSources set(USBnullSources

View File

@ -3,45 +3,27 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output dev9null-0.5.0) set(Output dev9null-0.5.0)
set(CommonFlags
-fvisibility=hidden
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(dev9nullFinalFlags "")
set(dev9nullFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(dev9nullFinalFlags ${OptimizationFlags})
# add defines
set(dev9nullFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(dev9nullFinalFlags ${OptimizationFlags})
# add defines
set(dev9nullFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# dev9null sources # dev9null sources
set(dev9nullSources set(dev9nullSources

View File

@ -3,40 +3,27 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output onepad-1.1.0) set(Output onepad-1.1.0)
set(CommonFlags
-fvisibility=hidden
-Wall
-std=c++0x
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(onepadFinalFlags set(onepadFinalFlags "")
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
if(CMAKE_BUILD_TYPE STREQUAL Devel) elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
set(onepadFinalFlags set(onepadFinalFlags ${OptimizationFlags})
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Release) elseif(CMAKE_BUILD_TYPE STREQUAL Release)
set(onepadFinalFlags set(onepadFinalFlags ${OptimizationFlags})
${CommonFlags} ${OptimizationFlags}
) endif()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# onepad sources # onepad sources
set(onepadSources set(onepadSources

View File

@ -9,45 +9,27 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output spu2x-2.0.0) set(Output spu2x-2.0.0)
set(CommonFlags
-fvisibility=hidden
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(spu2xFinalFlags "")
set(spu2xFinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(spu2xFinalFlags ${OptimizationFlags})
# add defines
set(spu2xFinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build elseif(CMAKE_BUILD_TYPE STREQUAL Release)
if(CMAKE_BUILD_TYPE STREQUAL Release) set(spu2xFinalFlags ${OptimizationFlags})
# add defines
set(spu2xFinalFlags endif()
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# spu2x sources # spu2x sources
set(spu2xSources set(spu2xSources

View File

@ -3,43 +3,26 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output zerospu2) set(Output zerospu2)
set(CommonFlags
-Wall
)
set(OptimizationFlags set(OptimizationFlags
-O2 -O2
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines set(zerospu2FinalFlags "")
set(zerospu2FinalFlags
${CommonFlags} -g
)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
if(CMAKE_BUILD_TYPE STREQUAL Devel) set(zerospu2FinalFlags ${OptimizationFlags})
# add defines
set(zerospu2FinalFlags elseif(CMAKE_BUILD_TYPE STREQUAL Release)
${CommonFlags} ${OptimizationFlags} set(zerospu2FinalFlags ${OptimizationFlags})
)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
set(zerospu2FinalFlags
${CommonFlags} ${OptimizationFlags}
)
endif(CMAKE_BUILD_TYPE STREQUAL Release) endif(CMAKE_BUILD_TYPE STREQUAL Release)
# zerospu2 sources # zerospu2 sources

View File

@ -20,7 +20,6 @@ endif(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg/opengl/ZeroGSShaders" AND REB
set(Output zzogl-0.4.0) set(Output zzogl-0.4.0)
set(CommonFlags set(CommonFlags
-pthread
-DZEROGS_SSE2 -DZEROGS_SSE2
-fno-strict-aliasing -fno-strict-aliasing
-Wstrict-aliasing # Allow to track strict aliasing issue. -Wstrict-aliasing # Allow to track strict aliasing issue.
@ -40,32 +39,22 @@ if(NOT USE_CLANG)
) )
endif(NOT USE_CLANG) endif(NOT USE_CLANG)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
set(zzoglFinalFlags set(zzoglFinalFlags
${zzoglFinalFlags} ${zzoglFinalFlags}
${CommonFlags} -g -Wall -D_DEBUG ${CommonFlags} -g -Wall -D_DEBUG
) )
endif(CMAKE_BUILD_TYPE STREQUAL Debug) elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
set(zzoglFinalFlags set(zzoglFinalFlags
${zzoglFinalFlags} ${zzoglFinalFlags}
${CommonFlags} ${OptimizationFlags} -g -W -DZEROGS_DEVBUILD ${CommonFlags} ${OptimizationFlags} -g -W -DZEROGS_DEVBUILD
) )
endif(CMAKE_BUILD_TYPE STREQUAL Devel) elseif(CMAKE_BUILD_TYPE STREQUAL Release)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
set(zzoglFinalFlags set(zzoglFinalFlags
${zzoglFinalFlags} ${zzoglFinalFlags}
${CommonFlags} ${OptimizationFlags} -W ${CommonFlags} ${OptimizationFlags} -W
) )
endif(CMAKE_BUILD_TYPE STREQUAL Release) endif()
# Select the shader API # Select the shader API
if(GLSL_API) if(GLSL_API)

View File

@ -3,14 +3,13 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR " message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED) endif()
# plugin name # plugin name
set(Output zzogl-shader) set(Output zzogl-shader)
set(CommonFlags set(CommonFlags
-pthread
-DZEROGS_SSE2 -DZEROGS_SSE2
-fno-strict-aliasing -fno-strict-aliasing
-Wstrict-aliasing # Allow to track strict aliasing issue. -Wstrict-aliasing # Allow to track strict aliasing issue.
@ -23,25 +22,15 @@ set(OptimizationFlags
-DNDEBUG -DNDEBUG
) )
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
set(zerogsshadersFinalFlags set(zerogsshadersFinalFlags
${CommonFlags} -g -Wall -D_DEBUG ${CommonFlags} -D_DEBUG
) )
endif(CMAKE_BUILD_TYPE STREQUAL Debug) elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
set(zerogsshadersFinalFlags set(zerogsshadersFinalFlags
${CommonFlags} ${OptimizationFlags} -g -W -DZEROGS_DEVBUILD ${CommonFlags} ${OptimizationFlags} -g -W -DZEROGS_DEVBUILD
) )
endif(CMAKE_BUILD_TYPE STREQUAL Devel) elseif(CMAKE_BUILD_TYPE STREQUAL Release)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
set(zerogsshadersFinalFlags set(zerogsshadersFinalFlags
${CommonFlags} ${OptimizationFlags} -W ${CommonFlags} ${OptimizationFlags} -W
) )