mirror of
https://github.com/aaru-dps/aaruremote.git
synced 2025-12-16 19:24:37 +00:00
Condition compilation of Linux SDHCI to be able to find the include files for UAPI.
This commit is contained in:
@@ -8,6 +8,7 @@ set(MAIN_SOURCES main.c list_devices.c device.c scsi.c hex2bin.c usb.c ieee1394.
|
||||
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
set(PLATFORM_SOURCES linux/list_devices.c linux/linux.h linux/device.c linux/scsi.c linux/usb.c linux/ieee1394.c linux/pcmcia.c linux/ata.c linux/sdhci.c)
|
||||
find_library(HAS_UDEV NAMES udev)
|
||||
find_path(UAPI_MMC ioctl.h /usr/include/linux/mmc/)
|
||||
endif ()
|
||||
|
||||
add_executable(dicremote-${CMAKE_SYSTEM_PROCESSOR} ${MAIN_SOURCES} ${PLATFORM_SOURCES})
|
||||
@@ -17,6 +18,10 @@ if (HAS_UDEV)
|
||||
add_definitions(-DHAS_UDEV)
|
||||
endif ()
|
||||
|
||||
if (UAPI_MMC)
|
||||
add_definitions(-DHAS_UAPI_MMC)
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
|
||||
add_executable(dicremote-x86 ${MAIN_SOURCES} ${PLATFORM_SOURCES})
|
||||
set_target_properties(dicremote-x86 PROPERTIES LINK_FLAGS -m32)
|
||||
|
||||
Reference in New Issue
Block a user