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: "install TARGETS given no LIBRARY DESTINATION for shared library target" on LINUX #38

Closed
requizm opened this issue Feb 6, 2021 · 5 comments

Comments

@requizm
Copy link

requizm commented Feb 6, 2021

I'm trying to build on linux with travis or appveyor. Windows builds perfectly working but linux not fine.
-arch: linux/amd64
-dist: ubuntu 14.04
-codename: trusty

error lines:

CMake Error at deps/glew/CMakeLists.txt:135 (install):
  install TARGETS given no LIBRARY DESTINATION for shared library target
  "libglew_shared".

My CMakeList file: (just glew parts)

execute_process(COMMAND git submodule update --init WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
add_definitions(-DGLEW_STATIC)
add_subdirectory(${CMAKE_SOURCE_DIR}/deps/glew EXCLUDE_FROM_ALL)
target_link_libraries(${PROJECT_NAME} PRIVATE libglew_static)

travis script:

cmake -E make_directory Build
cmake -E chdir Build cmake .. //error is happening in this command
cd Build
make

I saw #17 but doesn't affect me.

Edit: Working on github actions. I do not know what should i say. yml file:

ubuntu:
    strategy:
      matrix:
        include:
          - compiler: gcc
            cxxcompiler: g++
    # The CMake configure and build commands are platform agnostic and should work equally
    # well on Windows or Mac.  You can convert this to a matrix build if you need
    # cross-platform coverage.
    # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
      with:
          submodules: true
    - name: install packages and build
      shell: bash
      run: |
        sudo apt-get install cmake libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev
        cmake -BBuild -G "Unix Makefiles"
        cd Build
        make
@Perlmint
Copy link
Owner

Perlmint commented Feb 7, 2021

I found some cmake command not supported in the old version. I'll fix the script soon.

However, if you want to make it works right now, Please, use newer cmake - at least 3.14. The version of cmake apt package for ubuntu 14.04 is 2.8. You can use newer ubuntu or install cmake via PyPI

@requizm
Copy link
Author

requizm commented Feb 7, 2021

I found some cmake command not supported in the old version. I'll fix the script soon.

However, if you want to make it works right now, Please, use newer cmake - at least 3.14. The version of cmake apt package for ubuntu 14.04 is 2.8. You can use newer ubuntu or install cmake via PyPI

Thank you for answer. If you want, you can close this issue.

@Perlmint
Copy link
Owner

Perlmint commented Feb 9, 2021

I created PR fixing this. It'll work with cmake 2.8. If you don't mind can you test it works?

@requizm
Copy link
Author

requizm commented Feb 9, 2021

Its working. Thank you for that. By the way, my ubuntu 14.04 cmake version was 3.9.2. Because that yml line:

addons:
  apt:
    update: true

@Perlmint
Copy link
Owner

Perlmint commented Feb 9, 2021

Its working. Thank you for that. By the way, my ubuntu 14.04 cmake version was 3.9.2. Because that yml line:

addons:
  apt:
    update: true

Thanks for the fast response!
Actually, I just noticed cmake 2.8 emit 2 errors - the error you reported one and another one.

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