Properly list files in CMakeLists instead of using GLOB (#249)

This commit is contained in:
Maximilian Downey Twiss 2022-09-17 11:24:57 +10:00 committed by GitHub
parent 910cdf4d5c
commit 4a3d02db55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 757 additions and 89 deletions

View file

@ -1,8 +1,25 @@
project(CemuCommon)
file(GLOB CPP_FILES *.cpp)
file(GLOB H_FILES *.h)
add_library(CemuCommon ${CPP_FILES} ${H_FILES})
add_library(CemuCommon
betype.h
enumFlags.h
ExceptionHandler/ExceptionHandler.h
FileStream.h
GLInclude/glext.h
GLInclude/glFunctions.h
GLInclude/GLInclude.h
GLInclude/glxext.h
GLInclude/khrplatform.h
GLInclude/wglext.h
MemPtr.h
platform.h
precompiled.cpp
precompiled.h
socket.h
StackAllocator.h
SysAllocator.cpp
SysAllocator.h
version.h
zstring_view.h
)
set_property(TARGET CemuCommon PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
@ -16,17 +33,16 @@ if(WIN32)
else()
target_sources(CemuCommon
PRIVATE
unix/date.h
unix/fast_float.h
unix/platform.cpp
unix/platform.h
unix/FileStream_unix.cpp
unix/FileStream_unix.h
ExceptionHandler/ExceptionHandler_posix.cpp
)
endif()
target_sources(CemuCommon PRIVATE
ExceptionHandler/ExceptionHandler.h
)
# All the targets wanting to use the precompiled.h header
# have to link to CemuCommon
target_precompile_headers(CemuCommon PUBLIC precompiled.h)