summaryrefslogtreecommitdiffstats
path: root/smtk-import
diff options
context:
space:
mode:
Diffstat (limited to 'smtk-import')
-rw-r--r--smtk-import/CMakeLists.txt8
-rw-r--r--smtk-import/smtk_standalone.cpp1
2 files changed, 7 insertions, 2 deletions
diff --git a/smtk-import/CMakeLists.txt b/smtk-import/CMakeLists.txt
index 785c23887..1720b2eb1 100644
--- a/smtk-import/CMakeLists.txt
+++ b/smtk-import/CMakeLists.txt
@@ -3,7 +3,7 @@
project(smtk2ssrf)
cmake_minimum_required(VERSION 2.8.11)
-option(COMMANDLINE "Build command line version")
+option(COMMANDLINE "Build command line version" OFF)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
@@ -105,6 +105,12 @@ set(SMTK_IMPORT_TARGET smtk2ssrf)
add_library(smtk_import STATIC ${SMTK_IMPORT_SRCS})
add_executable(${SMTK_IMPORT_TARGET} smtk_standalone.cpp ${SUBSURFACE_RESOURCES})
+# We just want CLI mode on Linux. Silently drop it if cross building to Windows.
+if (COMMANDLINE AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ message(WARNING "Building Command Line mode.")
+ target_compile_definitions(${SMTK_IMPORT_TARGET} PRIVATE COMMANDLINE=1)
+endif()
+
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/qt.conf
diff --git a/smtk-import/smtk_standalone.cpp b/smtk-import/smtk_standalone.cpp
index 2442d70d4..dc152f42f 100644
--- a/smtk-import/smtk_standalone.cpp
+++ b/smtk-import/smtk_standalone.cpp
@@ -5,7 +5,6 @@
#include "smrtk2ssrfc_window.h"
#include <QApplication>
#include <QDebug>
-#define COMMANDLINE 1
extern "C" void smartrak_import(const char *file, struct dive_table *table);