Use CMAKE_SYSTEM_NAME to check whether we are running on Linux.

This commit is contained in:
Andrius Štikonas 2018-02-04 19:17:34 +00:00
parent aa23fc1168
commit af6c345210
2 changed files with 7 additions and 5 deletions

View File

@ -77,7 +77,7 @@ add_definitions(
)
kde_enable_exceptions()
if(LINUX)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
find_package(PkgConfig REQUIRED)
pkg_check_modules(BLKID REQUIRED blkid>=2.30)
endif()

View File

@ -23,11 +23,13 @@ install(FILES pmcorebackendplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR
# add_subdirectory(libparted)
#endif (PARTMAN_LIBPARTEDBACKEND)
option(PARTMAN_SFDISKBACKEND "Build the sfdisk backend plugin." ON)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
option(PARTMAN_SFDISKBACKEND "Build the sfdisk backend plugin." ON)
if (PARTMAN_SFDISKBACKEND)
add_subdirectory(sfdisk)
endif (PARTMAN_SFDISKBACKEND)
if (PARTMAN_SFDISKBACKEND)
add_subdirectory(sfdisk)
endif (PARTMAN_SFDISKBACKEND)
endif()
option(PARTMAN_DUMMYBACKEND "Build the dummy backend plugin." ON)