Changeset 6e2e363 in subsurface


Ignore:
Timestamp:
Jun 21, 2017, 6:40:04 PM (4 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
996fda1
Parents:
5f5e52f
git-author:
Salvador Cuñat <salvador.cunat@…> (06/16/17 07:40:47)
git-committer:
Dirk Hohndel <dirk@…> (06/21/17 18:40:04)
Message:

smtk-import: partially revert and complete 6963b52d

6963b52d introduced a cmake option, COMMANDLINE to enable building a
pure command line version of smtk2ssrf importer, but then the

#define COMMANDLINE=1 forces building CLI mode.

This patch allows building GUI or CLI versions depending on selection of
the COMMANDLINE option.

Signed-off-by: Salvador Cuñat <salvador.cunat@…>

Location:
smtk-import
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smtk-import/CMakeLists.txt

    r6963b52 r6e2e363  
    44cmake_minimum_required(VERSION 2.8.11)
    55
    6 option(COMMANDLINE "Build command line version")
     6option(COMMANDLINE "Build command line version" OFF)
    77
    88set(CMAKE_AUTOMOC ON)
     
    106106add_executable(${SMTK_IMPORT_TARGET} smtk_standalone.cpp ${SUBSURFACE_RESOURCES})
    107107
     108# We just want CLI mode on Linux. Silently drop it if cross building to Windows.
     109if (COMMANDLINE AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
     110        message(WARNING "Building Command Line mode.")
     111        target_compile_definitions(${SMTK_IMPORT_TARGET} PRIVATE COMMANDLINE=1)
     112endif()
     113
    108114if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
    109115        add_custom_command(
  • smtk-import/smtk_standalone.cpp

    r6963b52 r6e2e363  
    66#include <QApplication>
    77#include <QDebug>
    8 #define COMMANDLINE 1
    98
    109extern "C" void smartrak_import(const char *file, struct dive_table *table);
Note: See TracChangeset for help on using the changeset viewer.