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: cannot link to debug build #145

Open
GoogleCodeExporter opened this issue Dec 30, 2015 · 3 comments
Open

CMake: cannot link to debug build #145

GoogleCodeExporter opened this issue Dec 30, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link
Collaborator

What steps will reproduce the problem?
1. Compile OgreProcedural with CMAKE_BUILD_TYPE=Debug
2. Try to link our app to OgreProcedural

What is the expected output? What do you see instead?
There should be no problems linking, but the FindOgreProcedural.cmake file does 
not search for the correct lib file.

What version of the product are you using? On what operating system?
Mercurial, linux

Please provide any additional information below.

The main OgreProcedural target specifies:
"set_target_properties(OgreProcedural PROPERTIES DEBUG_POSTFIX _d)"

however FindOgreProcedural.cmake has:
find_library(OgreProcedural_LIBRARY_DBG NAMES 
${OgreProcedural_LIBRARY_NAMES_DBG} HINTS ${OgreProcedural_LIB_SEARCH_PATH} 
PATH_SUFFIXES "" "debug")

it should read:
find_library(OgreProcedural_LIBRARY_DBG NAMES 
${OgreProcedural_LIBRARY_NAMES_DBG} HINTS ${OgreProcedural_LIB_SEARCH_PATH} 
PATH_SUFFIXES "_d" "debug")

Original issue reported on code.google.com by kam1k...@gmail.com on 9 Sep 2013 at 5:18

@GoogleCodeExporter
Copy link
Collaborator Author

I'll try to reproduce the problem, but I don't think the fix you propose would 
work (have you tried it?), because Cmake documentation specifies : 

"PATH_SUFFIXES specifies additional subdirectories to check below each search 
path."

It doesn't look like a file suffix...
Also FindOGRE.Cmake also set PATH_SUFFIXES to "" (and it also has _d at the end 
of its libraries)

Original comment by michael.broutin@gmail.com on 10 Sep 2013 at 3:03

@GoogleCodeExporter
Copy link
Collaborator Author

Original comment by michael.broutin@gmail.com on 10 Sep 2013 at 3:03

  • Changed state: Accepted
  • Added labels: Difficulty-Easy, Milestone-0.3

@GoogleCodeExporter
Copy link
Collaborator Author

I see. When I tested it worked, but maybe that wasn't the real fix since I had 
some trouble with cached variables.

I'll retry and report as soon as possible. Thanks.

Original comment by kam1k...@gmail.com on 10 Sep 2013 at 4:07

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

No branches or pull requests

1 participant