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

cmake: error no LIBRARY DESTINATION for shared library target. #17

Closed
ArthurSonzogni opened this issue Apr 29, 2019 · 1 comment
Closed

Comments

@ArthurSonzogni
Copy link
Contributor

When doing

cmake ..

I get:

CMake Error at CMakeLists.txt:79 (INSTALL):
  INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
  "libglew_shared".


CMake Error at CMakeLists.txt:94 (INSTALL):
  INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
  "libglewmx_shared".


-- Configuring incomplete, errors occurred!

I bisected. This is caused by the merge:


commit e4de8a7
Merge: f92c14b 5a7232f
Author: Gyusun Yeom omniavinco@gmail.com
Date: Sat Apr 20 15:45:09 2019 +0900

Merge pull request #16 from GekkieHenkie/patch-1

Update library install directories in Cmake

commit 5a7232f
Author: GekkieHenkie 33967804+GekkieHenkie@users.noreply.github.com
Date: Tue Apr 9 23:59:48 2019 +0200

Install directories set in single statement

commit def19e7
Author: GekkieHenkie 33967804+GekkieHenkie@users.noreply.github.com
Date: Tue Apr 9 23:22:16 2019 +0200

Update library install directories in Cmake

Currently (well, at least on Windows), the created DLL files aren't installed to the correct directory after a build. The DLL files are installed to the 'lib' directory. Which actually is the place for the static library or the shared library's symbols file (.lib).
The shared library runtimes should be installed to the 'bin' output directory, as proposed in this PR.

See the ```CONFIGURATIONS``` option in [Install command introduction in the CMake manual](https://cmake.org/cmake/help/v3.14/command/install.html#introduction) for an example.

It's considered best practice and follows convention as used in other notable libraries as libpng, libogg/vorbis, freetype, zlib, tinyxml, etc, to install the runtime output in the 'bin' directory.
ArthurSonzogni added a commit to ArthurSonzogni/glew-cmake that referenced this issue Apr 29, 2019
…arget.

On Linux, cmake give the error:
~~~bash
CMake Error at CMakeLists.txt:79 (INSTALL):
INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
"libglew_shared".

CMake Error at CMakeLists.txt:94 (INSTALL):
INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
"libglewmx_shared".

-- Configuring incomplete, errors occurred!
~~~

This bug was caused by the merge:
e4de8a7

Containing:
* Update library install directories in Cmake
  commit 5a7232f

* Install directories set in single statement
  commit def19e7

The cause is that RUNTIME DESTINATION is now defined (for Windows), but
not LIBRARY DESTINATION (for Linux).

See:
Perlmint#17
ArthurSonzogni added a commit to ArthurSonzogni/glew-cmake that referenced this issue Apr 29, 2019
On Linux, cmake gives the error:
~~~bash
CMake Error at CMakeLists.txt:79 (INSTALL):
INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
"libglew_shared".

CMake Error at CMakeLists.txt:94 (INSTALL):
INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
"libglewmx_shared".

-- Configuring incomplete, errors occurred!
~~~

This bug was caused by the merge:
e4de8a7

Containing:
* Update library install directories in Cmake
  commit 5a7232f

* Install directories set in single statement
  commit def19e7

The cause is that RUNTIME DESTINATION is now defined (for Windows), but
not LIBRARY DESTINATION (for Linux).

See issue: Perlmint#17
@ArthurSonzogni
Copy link
Contributor Author

Fixed.

Perlmint pushed a commit that referenced this issue Jun 11, 2019
On Linux, cmake gives the error:
~~~bash
CMake Error at CMakeLists.txt:79 (INSTALL):
INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
"libglew_shared".

CMake Error at CMakeLists.txt:94 (INSTALL):
INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
"libglewmx_shared".

-- Configuring incomplete, errors occurred!
~~~

This bug was caused by the merge:
e4de8a7

Containing:
* Update library install directories in Cmake
  commit 5a7232f

* Install directories set in single statement
  commit def19e7

The cause is that RUNTIME DESTINATION is now defined (for Windows), but
not LIBRARY DESTINATION (for Linux).

See issue: #17
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

1 participant