diff --git a/Pal/CMakeLists.txt b/Pal/CMakeLists.txt index ec0155fa..e2f47647 100644 --- a/Pal/CMakeLists.txt +++ b/Pal/CMakeLists.txt @@ -4,5 +4,16 @@ set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS ON) project(graphene_pal) -add_subdirectory(src/host/Linux) -add_subdirectory(src/host/Linux-SGX) +if(NOT DEFINED SGX) + set(SGX $ENV{SGX}) +endif() + +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + if(${SGX}) + message("PAL target: Linux SGX") + add_subdirectory(src/host/Linux-SGX) + else() + message("PAL target: Linux") + add_subdirectory(src/host/Linux) + endif() +endif()