Skip to content

Commit

Permalink
Added cmake install targets
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierbichler-cea committed Jul 17, 2017
1 parent 960acd1 commit 9d9ca16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions N2D2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ ENDMACRO()
MACRO(N2D2_INCLUDE inc_path)
GET_DIRECTORIES(headers_dirs ${inc_path}/*.hpp)
INCLUDE_DIRECTORIES(${headers_dirs} ${inc_path})
INSTALL(DIRECTORY ${inc_path} DESTINATION include)
ENDMACRO()

SET(SRC "")
Expand Down Expand Up @@ -245,6 +246,10 @@ MACRO(N2D2_MAKE_LIBRARY name)
endif()

TARGET_LINK_LIBRARIES(${name} ${OpenCV_LIBS})

INSTALL(TARGETS ${name}
ARCHIVE DESTINATION lib
)
ENDMACRO()

MACRO(N2D2_COPY_DIRECTORY target src dst)
Expand Down
4 changes: 4 additions & 0 deletions exec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ foreach(f ${EXEC})
GET_FILENAME_COMPONENT(bin ${f} NAME_WE)
ADD_EXECUTABLE(${bin} ${f})
TARGET_LINK_LIBRARIES(${bin} -Wl,-whole-archive ${N2D2_LIB} -Wl,-no-whole-archive)

INSTALL(TARGETS ${bin}
RUNTIME DESTINATION bin
)
endforeach(f)

0 comments on commit 9d9ca16

Please sign in to comment.