Skip to content

Commit

Permalink
Fixes bug in examples CMakeLists file
Browse files Browse the repository at this point in the history
Uses the COMPILE_EXAMPLES flag of the root script to control building
examples
  • Loading branch information
vedadian committed Dec 26, 2022
1 parent 2c7d4f3 commit 2a20fad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.16)

add_executable(example1 ./main.cpp)
target_link_libraries(example1 SampleLibrary)
target_link_libraries(example1 Qt5::Core)
if(COMPILE_EXAMPLES)
add_executable(example1 ./main.cpp)
target_link_libraries(example1 SampleLibrary)
target_link_libraries(example1 Qt5::Core)
endif()

0 comments on commit 2a20fad

Please sign in to comment.