mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-08-03 11:23:49 +00:00
* feat(project): add root cmakelists for ide auto-detect * cmake: use repository root as source directory --------- Co-authored-by: nmzik <Nmzik@mail.ru>
35 lines
770 B
CMake
35 lines
770 B
CMake
file(GLOB common_src CONFIGURE_DEPENDS
|
|
"*.cpp"
|
|
"logging/*.cpp"
|
|
"platform/*.cpp"
|
|
)
|
|
|
|
file(GLOB_RECURSE common_headers CONFIGURE_DEPENDS "*.h")
|
|
|
|
if(KYTY_CLANG_CL)
|
|
set_source_files_properties(${common_src} PROPERTIES COMPILE_FLAGS "-Wno-pragma-pack")
|
|
endif()
|
|
|
|
add_library(common STATIC ${common_src} ${common_headers})
|
|
|
|
target_include_directories(common
|
|
PUBLIC ${KYTY_SOURCE_DIR}
|
|
PRIVATE
|
|
${KYTY_THIRD_PARTY_DIR}/cpuinfo/include
|
|
)
|
|
|
|
target_link_libraries(common
|
|
PUBLIC
|
|
fmt::fmt
|
|
Tracy::TracyClient
|
|
PRIVATE
|
|
cpuinfo
|
|
spdlog::spdlog
|
|
)
|
|
|
|
get_property(inc_headers TARGET common PROPERTY INCLUDE_DIRECTORIES)
|
|
set(check_headers ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
clang_tidy_check(common "" "${check_headers}" "${inc_headers}")
|
|
include_what_you_use(common "${inc_headers}")
|