diff --git a/src/lte/CMakeLists.txt b/src/lte/CMakeLists.txt index 91911b255..d08be8e88 100644 --- a/src/lte/CMakeLists.txt +++ b/src/lte/CMakeLists.txt @@ -2,21 +2,25 @@ set(emu_sources) set(emu_headers) set(emu_features) set(emu_libraries) -if(${ENABLE_EMU} - AND ${ENABLE_EMUNETDEV} +if(DEFINED + ENABLE_EMUNETDEV ) - set(emu_sources - helper/emu-epc-helper.cc - ) - set(emu_headers - helper/emu-epc-helper.h - ) - set(emu_features - EmuFdNetDevice - ) - set(emu_libraries - ${libfd-net-device} + if(${ENABLE_EMU} + AND ${ENABLE_EMUNETDEV} ) + set(emu_sources + helper/emu-epc-helper.cc + ) + set(emu_headers + helper/emu-epc-helper.h + ) + set(emu_features + EmuFdNetDevice + ) + set(emu_libraries + ${libfd-net-device} + ) + endif() endif() set(source_files diff --git a/src/lte/examples/CMakeLists.txt b/src/lte/examples/CMakeLists.txt index 525502e76..adcaa0b61 100644 --- a/src/lte/examples/CMakeLists.txt +++ b/src/lte/examples/CMakeLists.txt @@ -36,15 +36,19 @@ foreach( ) endforeach() -if(${ENABLE_EMU} - AND ${ENABLE_EMUNETDEV} +if(DEFINED + ENABLE_EMUNETDEV ) - build_lib_example( - NAME lena-simple-epc-emu - SOURCE_FILES lena-simple-epc-emu.cc - LIBRARIES_TO_LINK - ${liblte} - ${libfd-net-device} - ${libconfig-store} + if(${ENABLE_EMU} + AND ${ENABLE_EMUNETDEV} ) + build_lib_example( + NAME lena-simple-epc-emu + SOURCE_FILES lena-simple-epc-emu.cc + LIBRARIES_TO_LINK + ${liblte} + ${libfd-net-device} + ${libconfig-store} + ) + endif() endif()