CMake plugin build

Brx samples on linux use Codeblocks as IDE/Build tool.
Is there a comparable CMake project sample/template?

Comments

  • bubuker
    edited January 2018

    I tried to convert to CMake project.
    But i'm getting an error during addin loading.
    Am i missing something?

    Here is cmake project:

    cmake_minimum_required(VERSION 3.9)
    project(brxAdd)
    
    #set(CMAKE_CXX_STANDARD 11)
    
    include_directories(
            $ENV{BRX17_SDK_PATH}/inc
            $ENV{BRX17_SDK_PATH}/inc/Platform/substitutes
    )
    
    
    add_library(brxAdd SHARED
            Sample.cpp
    
            acrxEntryPoint.cpp
            StdAfx.h StdAfx.cpp
            arx_version.h
            sys_version.h
            resource.h
    
            cmd/cmdDbx.h cmd/cmdDbx.cpp
    #        cmd/cmdCom.h cmd/cmdCom.cpp
    #        cmd/cmdGui.h cmd/cmdGui.cpp
    
            dbx/MyEntity.h dbx/MyEntity.cpp
            dbx/MyOPMExtension.h dbx/MyOPMExtension.cpp
            )
    
    target_compile_options(brxAdd PUBLIC
            -O2
            -Wall
            -std=c++0x
            -frtti
            -fno-signed-zeros
            -fvisibility=default
            -fPIC
            -Wno-sign-compare
            -Wno-sign-conversion
            -Wno-empty-body
            -Wno-reorder
            -Wno-parentheses
            -Wno-switch
            -Wno-unused-parameter
            -Wno-unused-function
            -Wno-unused-variable
            -Wno-unused-label
            -Wno-unknown-pragmas
            -Wno-comment
            -Wno-strict-aliasing
            -Wno-unused-but-set-variable
            -Wno-unused-value
            -Wno-attributes
            -D_UNICODE
            -DUNICODE
            -DNDEBUG
            -D_AFXEXT
            -D_ACRXAPP
            -DBRX_APP
            -D_FILE_OFFSET_BITS=64
            -D_LARGE_FILES
            )
    
    
    set_target_properties(brxAdd PROPERTIES SUFFIX ".lrx")
    
    link_directories(
            $ENV{BRX17_SDK_PATH}/lib64
    )
    
    
    target_link_libraries(brxAdd PUBLIC
            -Wl,-whole-archive $ENV{BRX17_SDK_PATH}/lib64/libdrx_entrypoint.a -Wl,-no-whole-archive
            )
    
    target_link_libraries(brxAdd PUBLIC
        $ENV{BRX17_SDK_PATH}/lib64/libbrx17.so
        $ENV{BRX17_SDK_PATH}/lib64/libTD_Alloc.so
        $ENV{BRX17_SDK_PATH}/lib64/libTD_Root.so
        )
    
  • We have no CMake sample for a BRX application.

    Please enter a support request, and re-attach your CMake code there.
    Internally we can more practically track support requests, assign to appropriate analyst/developer...
    (That said, this forum post can still be useful in case it rings a bell to someone in our user's community.)

    But i'm getting an error during addin loading.

    What is the error message you are getting?
    Did cmake generation/ compiling / linking pass without error?

    From a glance I see nothing out of the ordinary, but I am no brx specialist.
    For a start, can you try running BricsCAD in a terminal and/or in a gdb session, there might be a useful error message on stderr.

  • Have you tried whether the CodeBlocks-generated .lrx module does work ?
    Or does it also trigger same error ?

    If it loads, then there seems to be some details missing with the CMake build ...
    but if it loads with same error, then we need to have a closer look at the CodeBlocks sample as well
    (though it always worked in our internal testing).

    many greetings !

  • Thank you for your replies!

    I built and loaded CodeBlocks-generated .lrx module without any problem.
    Then i tried to convert it to cmake based project.

    CMake project build passed without errors.

    Then i tried to load .lrx addin build using cmake and i'm getting this message:

    : _appload
    Loading /home/alexey/CLionProjects/brxAdd/cmake-build-debug/brxAdd.lrx
    Error loading "/home/alexey/CLionProjects/brxAdd/cmake-build-debug/brxAdd.lrx": .
    /home/alexey/CLionProjects/brxAdd/cmake-build-debug/brxAdd.lrx loading failed.

    Not sure what i've missed. Could you please review the cmake project.

    Here is project (i've converted brxSample example):

  • I've also submitted a request

This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!