mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 13:45:38 +00:00
Some CMake configuration changes for building with rlottie.
This commit is contained in:
parent
b3421823a7
commit
d45c690586
|
@ -161,7 +161,7 @@ if(CMAKE_BUILD_TYPE MATCHES Debug)
|
|||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /Od /DEBUG:FULL")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O0 -g3 -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O0 -g3 -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers -Wunused-macros")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O0")
|
||||
endif()
|
||||
# If using Clang, then add additional debug data needed by GDB.
|
||||
|
@ -176,7 +176,7 @@ elseif(CMAKE_BUILD_TYPE MATCHES Profiling)
|
|||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /O2 /DEBUG:FULL")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -g3 -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -g3 -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers -Wunused-macros")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2")
|
||||
endif()
|
||||
else()
|
||||
|
@ -185,7 +185,7 @@ else()
|
|||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG /std:c++17 /O2 /DEBUG:NONE")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -DNDEBUG -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -DNDEBUG -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers -Wunused-macros")
|
||||
if(APPLE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2")
|
||||
else()
|
||||
|
@ -479,7 +479,7 @@ set(EXECUTABLE_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
|
|||
set(LIBRARY_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
|
||||
|
||||
# Add each component.
|
||||
add_subdirectory("external" EXCLUDE_FROM_ALL)
|
||||
add_subdirectory("external")
|
||||
add_subdirectory("es-core")
|
||||
add_subdirectory("es-app")
|
||||
|
||||
|
|
|
@ -113,13 +113,6 @@ if(WIN32)
|
|||
LIST(APPEND ES_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation.rc)
|
||||
endif()
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
# Miscellaneous configuration.
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-macros")
|
||||
endif()
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
# OS-specific installation and package generation setup.
|
||||
|
||||
|
|
|
@ -167,10 +167,6 @@ set(CORE_SOURCES
|
|||
#---------------------------------------------------------------------------------------------------
|
||||
# Miscellaneous configuration.
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-macros")
|
||||
endif()
|
||||
|
||||
include_directories(${COMMON_INCLUDE_DIRS})
|
||||
add_library(es-core STATIC ${CORE_SOURCES} ${CORE_HEADERS})
|
||||
target_link_libraries(es-core ${COMMON_LIBRARIES})
|
||||
|
|
10
external/CMakeLists.txt
vendored
10
external/CMakeLists.txt
vendored
|
@ -12,10 +12,16 @@ if(NOT WIN32)
|
|||
endif()
|
||||
|
||||
# There is a bug that makes rlottie hang forever on application shutdown if compiled using MinGW
|
||||
# with threading support enabled. Disable it for MSVC as well to keep the behavior consistent.
|
||||
# with threading support enabled. Disable it for MSVC as well to keep the behavior consistent
|
||||
# across builds with either of these compilers.
|
||||
if(WIN32)
|
||||
option(LOTTIE_THREAD OFF)
|
||||
endif()
|
||||
|
||||
option(LOTTIE_MODULE OFF)
|
||||
add_subdirectory("rlottie")
|
||||
|
||||
# Only use the compiler and linker flags defined by rlottie.
|
||||
unset(CMAKE_CXX_FLAGS)
|
||||
unset(CMAKE_EXE_LINKER_FLAGS)
|
||||
|
||||
add_subdirectory("rlottie" EXCLUDE_FROM_ALL)
|
||||
|
|
Loading…
Reference in a new issue