diff options
Diffstat (limited to 'api/franca/CMakeLists.txt')
-rw-r--r-- | api/franca/CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/api/franca/CMakeLists.txt b/api/franca/CMakeLists.txt index 95c72fc..ee3c795 100644 --- a/api/franca/CMakeLists.txt +++ b/api/franca/CMakeLists.txt @@ -29,7 +29,13 @@ option(COMMONAPI_TOOL_DIR option(COMMONAPI_DBUS_TOOL_DIR "Absolute path to CommonAPI-DBus tool" "") -set(COMMONAPI_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}) +get_directory_property(hasParent PARENT_DIRECTORY) + +if(hasParent) + set(COMMONAPI_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/src-gen" PARENT_SCOPE) +else() + set(COMMONAPI_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/src-gen") +endif() if (COMMONAPI_TOOL_DIR) message(STATUS "COMMONAPI_TOOL_DIR ${COMMONAPI_TOOL_DIR}") |