Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 08:42:39 +0000



Post From: CMake and Including the Sierra Chart Header files?

[2020-09-24 13:36:01]
AlexPereira - Posts: 197
this is part of what i am using for my project: ( i have a symlink to the ACS_Sources dir on /home/alex/.sierracharts_source )


cmake_minimum_required(VERSION 3.13)

SET(CMAKE_CXX_COMPILER "/usr/bin/x86_64-w64-mingw32-g++")

project(ajp_study)

SET(CMAKE_SYSTEM_NAME Win32)
SET(CMAKE_CROSSCOMPILING 1)
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-fno-exceptions -fpermissive")
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-fno-exceptions -fpermissive")
SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
SET(CMAKE_SHARED_LIBRARY_PREFIX "")

MESSAGE( "64 bits compiler detected" )
SET(CMAKE_SYSTEM_PROCESSOR x86_64)
SET(CMAKE_CXX_FLAGS "-march=x86-64 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -fpermissive -std=gnu++11")
SET(CMAKE_SHARED_LIBRARY_SUFFIX "_64.dll")

add_subdirectory(src)
#subdirs(src)

#gentoo linux
target_include_directories(ajp_study PUBLIC /home/alex/.sierracharts_source /usr/x86_64-w64-mingw32/mingw/include/)
#opensuse
#target_include_directories(ajp_study PUBLIC /home/alex/.sierracharts_source /usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32/include)


target_compile_options(ajp_study PUBLIC -fpermissive -Wno-deprecated -Wno-ignored-attributes -fms-extensions)


install(TARGETS ajp_study RUNTIME DESTINATION "specified path to install XYZ" LIBRARY  DESTINATION "specified path to install XYZ")