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

openexr/OpenEXR_Viewers/config/LocateCg.cmake issue on Linux #665

Closed
etheory opened this issue Feb 19, 2020 · 2 comments
Closed

openexr/OpenEXR_Viewers/config/LocateCg.cmake issue on Linux #665

etheory opened this issue Feb 19, 2020 · 2 comments
Labels
Needs Discussion To be discussed in the technical steering committee
Milestone

Comments

@etheory
Copy link

etheory commented Feb 19, 2020

Hi there!

I've been struggling to build OpenEXR on CentOS-7.4.5 with CMake-3.14.5 due to the following:

add_library(Cg UNKNOWN IMPORTED GLOBAL)
and
add_library(CgGL UNKNOWN IMPORTED GLOBAL)

only get correctly added if I change them to:

add_library(Cg SHARED IMPORTED GLOBAL)
and
add_library(CgGL SHARED IMPORTED GLOBAL)

otherwise I get the error:

NOTICE-- Found Cg library
CMake Error at OpenEXR_Viewers/config/LocateCg.cmake:27 (add_library):
add_library cannot create ALIAS target "Cg::Cg" because target "Cg" is not
a library.
Call Stack (most recent call first):
OpenEXR_Viewers/CMakeLists.txt:47 (include)

For both Cg and CgGL

Which appears to be thrown by:
add_library(Cg::Cg ALIAS Cg)
and
add_library(Cg::CgGL ALIAS CgGL)

When their target type is

UNKNOWN

Are you aware of this issue and is there anything I can do about it aside from hacking the CMake?

Thanks,
Luke

@cary-ilm cary-ilm added the Needs Discussion To be discussed in the technical steering committee label Feb 20, 2020
@fnaum
Copy link

fnaum commented Feb 24, 2020

I think that was fixed in cmake-3.15.0
https://gitlab.kitware.com/cmake/cmake/issues/18327
https://gitlab.kitware.com/cmake/cmake/merge_requests/3148
I did not try that version, but updating to 3.16.4 did the trick.

So I guess you'll need cmake_minimum_required(VERSION 3.15) here

@etheory
Copy link
Author

etheory commented Feb 24, 2020

Thanks @fnaum!

@etheory etheory closed this as completed Feb 24, 2020
@cary-ilm cary-ilm added this to the v2.5.0 milestone Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Discussion To be discussed in the technical steering committee
Projects
None yet
Development

No branches or pull requests

3 participants