2010-11-17 05:49:11 +00:00
|
|
|
# Check that people use the good file
|
|
|
|
if(NOT TOP_CMAKE_WAS_SOURCED)
|
2021-07-04 05:24:21 +00:00
|
|
|
message(FATAL_ERROR "
|
|
|
|
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")
|
2010-11-17 05:49:11 +00:00
|
|
|
endif(NOT TOP_CMAKE_WAS_SOURCED)
|
|
|
|
|
2021-07-18 06:45:18 +00:00
|
|
|
add_library(Utilities)
|
|
|
|
|
|
|
|
# Utilities sources
|
|
|
|
target_sources(Utilities PRIVATE
|
2015-11-17 17:30:20 +00:00
|
|
|
VirtualMemory.cpp
|
2015-06-05 18:31:14 +00:00
|
|
|
AlignedMalloc.cpp
|
2010-11-17 05:49:11 +00:00
|
|
|
../../include/Utilities/FixedPointTypes.inl
|
|
|
|
../../include/Utilities/EventSource.inl
|
2014-08-17 11:03:43 +00:00
|
|
|
../../include/Utilities/SafeArray.inl
|
2010-11-17 05:49:11 +00:00
|
|
|
CheckedStaticBox.cpp
|
|
|
|
Console.cpp
|
|
|
|
EventSource.cpp
|
|
|
|
Exceptions.cpp
|
|
|
|
FastFormatString.cpp
|
|
|
|
IniInterface.cpp
|
|
|
|
Linux/LnxHostSys.cpp
|
|
|
|
Mutex.cpp
|
|
|
|
PathUtils.cpp
|
|
|
|
PrecompiledHeader.cpp
|
2015-12-06 11:57:54 +00:00
|
|
|
Perf.cpp
|
2010-11-17 05:49:11 +00:00
|
|
|
pxCheckBox.cpp
|
|
|
|
pxRadioPanel.cpp
|
|
|
|
pxStaticText.cpp
|
|
|
|
pxStreams.cpp
|
|
|
|
pxTranslate.cpp
|
|
|
|
pxWindowTextWriter.cpp
|
2017-02-16 18:50:33 +00:00
|
|
|
RwMutex.cpp
|
2010-11-17 05:49:11 +00:00
|
|
|
StringHelpers.cpp
|
|
|
|
ThreadingDialogs.cpp
|
|
|
|
ThreadTools.cpp
|
|
|
|
wxAppWithHelpers.cpp
|
|
|
|
wxGuiTools.cpp
|
|
|
|
wxHelpers.cpp
|
|
|
|
)
|
|
|
|
|
2021-07-18 06:45:18 +00:00
|
|
|
# Utilities headers
|
|
|
|
target_sources(Utilities PRIVATE
|
2010-11-17 05:49:11 +00:00
|
|
|
../../include/Utilities/Assertions.h
|
2018-11-16 18:41:37 +00:00
|
|
|
../../include/Utilities/boost_spsc_queue.hpp
|
2010-11-17 05:49:11 +00:00
|
|
|
../../include/Utilities/CheckedStaticBox.h
|
|
|
|
../../include/Utilities/Console.h
|
|
|
|
../../include/Utilities/Dependencies.h
|
|
|
|
../../include/Utilities/EventSource.h
|
|
|
|
../../include/Utilities/Exceptions.h
|
|
|
|
../../include/Utilities/FixedPointTypes.h
|
|
|
|
../../include/Utilities/General.h
|
|
|
|
../../include/Utilities/MemcpyFast.h
|
|
|
|
../../include/Utilities/MemsetFast.inl
|
|
|
|
../../include/Utilities/Path.h
|
|
|
|
../../include/Utilities/PageFaultSource.h
|
|
|
|
../../include/Utilities/pxCheckBox.h
|
2010-12-14 20:12:03 +00:00
|
|
|
../../include/Utilities/pxForwardDefs.h
|
2010-11-17 05:49:11 +00:00
|
|
|
../../include/Utilities/pxRadioPanel.h
|
|
|
|
../../include/Utilities/pxStaticText.h
|
|
|
|
../../include/Utilities/pxStreams.h
|
|
|
|
../../include/Utilities/RedtapeWindows.h
|
2017-02-16 18:50:33 +00:00
|
|
|
../../include/Utilities/RwMutex.h
|
2010-11-17 05:49:11 +00:00
|
|
|
../../include/Utilities/SafeArray.h
|
|
|
|
../../include/Utilities/ScopedAlloc.h
|
|
|
|
../../include/Utilities/ScopedPtrMT.h
|
|
|
|
../../include/Utilities/StringHelpers.h
|
|
|
|
../../include/Utilities/Threading.h
|
|
|
|
../../include/Utilities/ThreadingDialogs.h
|
|
|
|
../../include/Utilities/TraceLog.h
|
|
|
|
../../include/Utilities/wxAppWithHelpers.h
|
|
|
|
../../include/Utilities/wxBaseTools.h
|
|
|
|
../../include/Utilities/wxGuiTools.h
|
2015-11-17 17:30:20 +00:00
|
|
|
PrecompiledHeader.h
|
2017-02-16 18:50:33 +00:00
|
|
|
ThreadingInternal.h
|
2015-11-17 17:30:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(APPLE)
|
2021-07-18 06:45:18 +00:00
|
|
|
target_sources(Utilities PRIVATE
|
2015-11-17 17:30:20 +00:00
|
|
|
Darwin/DarwinThreads.cpp
|
|
|
|
Darwin/DarwinMisc.cpp
|
|
|
|
Darwin/DarwinSemaphore.cpp
|
|
|
|
)
|
2017-02-16 18:50:33 +00:00
|
|
|
elseif(Windows)
|
2021-07-18 06:45:18 +00:00
|
|
|
target_sources(Utilities PRIVATE
|
2017-02-16 18:50:33 +00:00
|
|
|
x86/MemcpyFast.cpp
|
|
|
|
Windows/WinThreads.cpp
|
|
|
|
Windows/WinHostSys.cpp
|
|
|
|
Windows/WinMisc.cpp
|
|
|
|
)
|
2015-11-17 17:30:20 +00:00
|
|
|
else()
|
2021-07-18 06:45:18 +00:00
|
|
|
target_sources(Utilities PRIVATE
|
2015-11-17 17:30:20 +00:00
|
|
|
Linux/LnxThreads.cpp
|
|
|
|
Linux/LnxMisc.cpp
|
|
|
|
Semaphore.cpp
|
|
|
|
)
|
|
|
|
endif()
|
2010-11-17 05:49:11 +00:00
|
|
|
|
2021-07-18 06:45:18 +00:00
|
|
|
target_link_libraries(Utilities PRIVATE ${LIBC_LIBRARIES} PUBLIC wxWidgets::all)
|
|
|
|
target_compile_features(Utilities PUBLIC cxx_std_17)
|
|
|
|
target_include_directories(Utilities PUBLIC ../../../3rdparty/include ../../include PRIVATE ../../include/Utilities .)
|
|
|
|
target_compile_definitions(Utilities PUBLIC "${PCSX2_DEFS}")
|
|
|
|
target_compile_options(Utilities PRIVATE "${PCSX2_WARNINGS}")
|
|
|
|
if(COMMAND target_precompile_headers)
|
|
|
|
target_precompile_headers(Utilities PRIVATE PrecompiledHeader.h)
|
|
|
|
endif()
|