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

[CImgPlugin] Use sofa cmake command to create proper package #544

Merged
merged 1 commit into from
Dec 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions applications/plugins/CImgPlugin/CImgPluginConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CMake package configuration file for the CImgPlugin plugin

@PACKAGE_INIT@

find_package(SofaGeneral REQUIRED)

if(NOT TARGET CImgPlugin)
include("${CMAKE_CURRENT_LIST_DIR}/CImgPluginTargets.cmake")
endif()

check_required_components(CImgPlugin)
12 changes: 6 additions & 6 deletions applications/plugins/CImgPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 2.8.12)
project(CImgPlugin)

set(${PROJECT_NAME}_MAJOR_VERSION 0)
set(${PROJECT_NAME}_MINOR_VERSION 1)
set(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION})

## RPATH
if(UNIX)
set(CMAKE_INSTALL_RPATH "../lib")
Expand Down Expand Up @@ -90,10 +94,6 @@ target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CUR
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CImg_INCLUDE_DIRS}>")

install(TARGETS ${PROJECT_NAME}
COMPONENT CImgPlugin_libraries
EXPORT CImgPluginTargets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
## Install rules for the library; CMake package configurations files
sofa_create_package(${PROJECT_NAME} ${${PROJECT_NAME}_VERSION} ${PROJECT_NAME} ${PROJECT_NAME})