I made a library named Zik. I compiled it in both release and debug
mode in Visual Studio, then installed it like this:
Zik
|--source
|--build
+--distribution
|--include
+--bin
+--Visual Studio 10
|--Zik.lib (release version)
+--Zik_d.lib (debug version)
My question is, how do I edit my Find script so that it selects the
right version of the library based on the configuration of the project
that wants to use the library?
Here is my find script so far:
#################################################################
# - Find Zik
# Find the Zik includes and library.
# Once done this will define
#
# Zik_INCLUDE_DIRS - where to Zik include directory
# Zik_LIBRARIES - List of libraries when using Zik.
# Zik_FOUND - True if Zik found.
FIND_PATH(Zik_INCLUDE_DIR Zik/Window.h
HINTS
C:/Users/Cold/Dev/C++/Library/Zik/distribution/include
)
FIND_LIBRARY(Zik_LIBRARY
NAMES
${Zik_NAMES}
HINTS
C:/Users/Cold/Dev/C++/Library/Zik/distribution/bin/${CMAKE_GENERATOR}
)
SET(Zik_INCLUDE_DIRS ${Zik_INCLUDE_DIR})
SET(Zik_LIBRARIES ${Zik_LIBRARY})
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Zik DEFAULT_MESSAGE
Zik_INCLUDE_DIR Zik_LIBRARY)
MARK_AS_ADVANCED(Zik_LIBRARY Zik_INCLUDE_DIR)
#################################################################
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake