Dear List,

I've got a cmake project that pretty much looks like this:

###############################################################

cmake_minimum_required(VERSION 3.0)

SET(CMAKE_DEBUG_POSTFIX "_d")

include_directories(../TransfunctionerProject)
include_directories(../TransmogrifierProject)

set(Libraries
    ContinuumTransfunctioner
    Transmogrifier
)

set(SourceFiles
    Wrapper.cpp
    Logger.cpp
)

add_library(Frobnigator SHARED ${SourceFiles})
add_library(FrobnigatorStatic STATIC ${SourceFiles})
set_target_properties(FrobnigatorStatic PROPERTIES OUTPUT_NAME Frobnigator)
target_link_libraries(Frobnigator ${Libraries})

###############################################################

Where ContinuumTransfunctioner and Transmogrifier projects include the debug postfix directive SET(CMAKE_DEBUG_POSTFIX "_d") so that libContinuumTransfunctioner_d.so and libTransmogrifier_d.so both exist.

The problem is that the current project appears to be linking against the static library without the _d suffix and complains:

/usr/bin/ld: cannot find -lContinuumTransfunctioner

How can I direct cmake to link against shared object with debug postfix (_d)

Thanks

- Olumide




--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to