Skip to content

Commit b54aa2c

Browse files
committed
Only specify gui executable if enabled.
This change prevents this error when gui is disabled: ``` CMake Error at CMakeLists.txt:55 (add_executable): No SOURCES given to target: LabRecorder ```
1 parent 6b0d4ec commit b54aa2c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ endif(BUILD_GUI)
5252
find_package(Threads REQUIRED)
5353

5454
# Targets
55-
add_executable(${PROJECT_NAME} MACOSX_BUNDLE)
5655

5756
## xdfwriter - stand alone library
5857
add_subdirectory(xdfwriter)
5958

6059
if (BUILD_GUI)
60+
add_executable(${PROJECT_NAME} MACOSX_BUNDLE)
61+
6162
target_sources(${PROJECT_NAME} PRIVATE
6263
src/main.cpp
6364
src/mainwindow.cpp

0 commit comments

Comments
 (0)