KenzieMac130 / ogre-procedural

Automatically exported from code.google.com/p/ogre-procedural
0 stars 0 forks source link

CMake: cannot link to debug build #145

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago

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

GoogleCodeExporter commented 8 years ago
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