Skip to content

Bare minimum C++ example #358

Answered by j-friedl
j-friedl asked this question in Q&A
Jul 28, 2022 · 4 comments · 5 replies
Discussion options

You must be logged in to vote

I added glog to my library list and it compiled.

So my CMakeLists.txt looks like that:

# Specify the minimum version
cmake_minimum_required(VERSION 3.0)
# Specify the project name
project(ifm3d-example)
# Declare the project target
add_executable(${PROJECT_NAME}
main.cpp
)

find_package(ifm3d REQUIRED)
# Libraries to link
target_link_libraries(${PROJECT_NAME} PRIVATE
                     ifm3d_framegrabber
                     ifm3d_camera
                     ifm3d_stlimage
                     glog
                     )

After

mkdir build && cd build
cmake ..
make

I get:

Scanning dependencies of target ifm3d-example
[ 50%] Building CXX object CMakeFiles/ifm3d-example.dir/main.cpp.o

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@j-friedl
Comment options

Comment options

You must be logged in to vote
3 replies
@j-friedl
Comment options

@inbangsa
Comment options

@j-friedl
Comment options

Comment options

You must be logged in to vote
1 reply
@j-friedl
Comment options

Answer selected by j-friedl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants