2017-01-01 18:59:46 +00:00
|
|
|
project(systeminfo)
|
|
|
|
|
|
|
|
find_package(Qt5Core)
|
|
|
|
|
|
|
|
set(systeminfo_SOURCES
|
|
|
|
include/sys.h
|
2018-03-11 22:00:54 +00:00
|
|
|
include/distroutils.h
|
|
|
|
src/distroutils.cpp
|
2017-01-01 18:59:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if (WIN32)
|
2018-07-15 12:51:05 +00:00
|
|
|
list(APPEND systeminfo_SOURCES src/sys_win32.cpp)
|
2017-01-01 18:59:46 +00:00
|
|
|
elseif (UNIX)
|
2018-07-15 12:51:05 +00:00
|
|
|
if(APPLE)
|
|
|
|
list(APPEND systeminfo_SOURCES src/sys_apple.cpp)
|
|
|
|
else()
|
|
|
|
list(APPEND systeminfo_SOURCES src/sys_unix.cpp)
|
|
|
|
endif()
|
2017-01-01 18:59:46 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(systeminfo STATIC ${systeminfo_SOURCES})
|
2018-06-01 14:20:33 +00:00
|
|
|
target_link_libraries(systeminfo Qt5::Core Qt5::Gui Qt5::Network)
|
2017-01-01 18:59:46 +00:00
|
|
|
target_include_directories(systeminfo PUBLIC include)
|
|
|
|
|
2022-06-11 23:46:30 +00:00
|
|
|
ecm_add_test(src/sys_test.cpp LINK_LIBRARIES systeminfo Qt5::Test TEST_NAME sys)
|