Skip to content

Commit

Permalink
create cmakelists
Browse files Browse the repository at this point in the history
  • Loading branch information
henrykrumb committed Jul 6, 2023
1 parent 9cdc9c4 commit 0710bd1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*.o
spnavigt
build/
30 changes: 30 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
project(spacenavigt)
include(FetchContent)

FetchContent_Declare(
OpenIGTLink
GIT_REPOSITORY https://github.com/openigtlink/OpenIGTLink
GIT_TAG d4eaae937b6a28ea2324f90c128800b3ad1cf2b3
)
FetchContent_MakeAvailable(OpenIGTLink)

FetchContent_Declare(
spnav
GIT_REPOSITORY https://github.com/FreeSpacenav/libspnav
GIT_TAG master
CONFIGURE_COMMAND "./configure"
BUILD_COMMAND "make"
)
FetchContent_MakeAvailable(spnav)

find_package(OpenIGTLink REQUIRED)
include(${OpenIGTLink_USE_FILE})
add_executable(spnavigt src/spnavigt.cpp)
target_link_libraries(spnavigt OpenIGTLink spnav)
set_target_properties(spnavigt PROPERTIES OUTPUT_NAME spnavigt)

install(
TARGETS spnavigt
DESTINATION /usr/local/bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)

0 comments on commit 0710bd1

Please sign in to comment.