Skip to content

Cannot find idl file if it's in non-related folder #5

@xakod

Description

@xakod

I have a bit strange project struct... :)
For example, I have:

/root

/mylib

/source

/mylib.idl

/project

CMakeLists.txt with add_idl

So I use add_idl(mylibIDL ${CMAKE_SOURCE_DIR}/mylib/source/mylib.idl).
Now, look at
${CMAKE_SOURCE_DIR}/mylib/source/mylib.idl
function(add_idl _target _idlfile) and then at
https://github.com/apriorit/FindIDL/blob/master/cmake/FindIDL.cmake#L19
COMMAND midl.exe ARGS /${MIDL_ARCH} /env ${MIDL_ARCH} /nologo ${CMAKE_CURRENT_LIST_DIR}/${_idlfile}

If we expand ${_idlfile} here it will become
COMMAND midl.exe ARGS /${MIDL_ARCH} /env ${MIDL_ARCH} /nologo ${CMAKE_CURRENT_LIST_DIR}/${CMAKE_SOURCE_DIR}/mylib/source/mylib.idl
Now we have a problem :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions