ppovb5fc7/sdformat/cmake/sdf_config.cmake.in

38 lines
1.3 KiB
CMake
Raw Permalink Normal View History

2019-03-25 11:01:43 +08:00
if (@PKG_NAME@_CONFIG_INCLUDED)
return()
endif()
set(@PKG_NAME@_CONFIG_INCLUDED TRUE)
list(APPEND @PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/sdformat-@SDF_VERSION@")
list(APPEND @PKG_NAME@_CFLAGS "-I@CMAKE_INSTALL_PREFIX@/include/sdformat-@SDF_VERSION@")
if (NOT WIN32)
list(APPEND @PKG_NAME@_CXX_FLAGS "${@PKG_NAME@_CFLAGS} -std=c++11")
endif()
list(APPEND @PKG_NAME@_LIBRARY_DIRS "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@")
foreach(lib @PKG_LIBRARIES@)
set(onelib "${lib}-NOTFOUND")
find_library(onelib ${lib}
PATHS "@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@"
NO_DEFAULT_PATH
)
if(NOT onelib)
message(FATAL_ERROR "Library '${lib}' in package @PKG_NAME@ is not installed properly")
endif()
list(APPEND @PKG_NAME@_LIBRARIES "${onelib}")
endforeach()
find_package(ignition-math@IGNITION-MATH_REQUIRED_MAJOR_VERSION@)
list(APPEND @PKG_NAME@_INCLUDE_DIRS ${IGNITION-MATH_INCLUDE_DIRS})
list(APPEND @PKG_NAME@_LIBRARIES ${IGNITION-MATH_LIBRARIES})
list(APPEND @PKG_NAME@_LIBRARY_DIRS ${IGNITION-MATH_LIBRARY_DIRS})
find_package(Boost)
list(APPEND @PKG_NAME@_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
list(APPEND @PKG_NAME@_LIBRARIES ${Boost_LIBRARIES})
list(APPEND @PKG_NAME@_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})
list(APPEND @PKG_NAME@_LDFLAGS "-L@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@")