Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when packaging on Windows with subfolders #108

Open
Palamecia opened this issue Aug 7, 2017 · 1 comment
Open

Issues when packaging on Windows with subfolders #108

Palamecia opened this issue Aug 7, 2017 · 1 comment

Comments

@Palamecia
Copy link

Hello,
We are trying to package our framework on Windows and we are using subfolders. Our tree is :

bin/framework_name/binaries, dll
lib/ framework_name/lib

When dll are generated, they are found in lib and once they are installed, all files are found in lib. This represents an issue when we run tests because the executables cannot charge the dll, as well as during packaging since the generated tree does not match our expectations.

This issue seems connected to the following files:
install.cmake :

  if(ARG_SUBFOLDER)
    set(_dll_output ${QI_SDK_LIB}/${ARG_SUBFOLDER})
  else()
    set(_dll_output ${QI_SDK_BIN})
  endif()

   if(WIN32)
    set(_runtime_output ${_dll_output})
  else()
    set(_runtime_output ${QI_SDK_BIN}/${ARG_SUBFOLDER})
  endif()

target.cmake :

  # Prevent having '//' in folder names, vs 2008 does not like it
  if("${ARG_SUBFOLDER}" STREQUAL "")
    set(_runtime_out "${QI_SDK_DIR}/${QI_SDK_BIN}")
    set(_lib_out     "${QI_SDK_DIR}/${QI_SDK_LIB}")
  else()
    set(_runtime_out "${QI_SDK_DIR}/${QI_SDK_LIB}/${ARG_SUBFOLDER}")
    set(_lib_out     "${QI_SDK_DIR}/${QI_SDK_LIB}/${ARG_SUBFOLDER}")
  endif()

Why is it that the _runtime_out(put) variable uses QI_SDK_BIN with no SUBFOLDER positioned, and QI_SDK_LIB with a SUBFOLDER?
Shouldn't we always use QI_SDK_BIN or at least be able to configure the expected behavior?

We also encounter issues when generating -config.cmake files, but these issues seem to be solved in the next branch (commit 05479f6).
Are there any plans for a new version including this modification?

@victorpaleologue
Copy link

victorpaleologue commented Aug 7, 2017

Why is it that the _runtime_out(put) variable uses QI_SDK_BIN with no SUBFOLDER positioned, and QI_SDK_LIB with a SUBFOLDER?

I think this is because using a subfolder is actually a specific use case, where it is not the system that will find the libraries automatically, but instead the library specifies special paths. In that case SUBFOLDER is used and qibuild should comply precisely, so that the library or its users can find the binary under ${QI_SDK_LIB}/${ARG_SUBFOLDER}.

When not using a subfolder, it means you want to be able to rely on the system to find the library, that is to say that it has to be under ${QI_SDK_LIB} on Linux, and ${QI_SDK_BIN} on Winows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants