Skip to content
Snippets Groups Projects
Commit 041ce60c authored by pospelov's avatar pospelov
Browse files

attempt to provide mac/linux compatibility

parent c639c5bc
No related branches found
No related tags found
No related merge requests found
......@@ -47,13 +47,32 @@ OTHER_FILES += \
OBJECTS_DIR = obj
# special configuration for shared library production
configB{
TEMPLATE=lib
CONFIG+=plugin
SOURCES -= src/main.cpp
# DEFINES += CORE_LIBRARY
}
# pretty output
#QMAKE_CXX = @echo [C++ ] $< && $$QMAKE_CXX
#QMAKE_LINK = @echo [LINK] $@ && $$QMAKE_LINK
#############################################################
# adding ROOT libraries
# the problem here is that system variables doesn;t propagate
# into QtCreator
#############################################################
#INCLUDEPATH += /opt/local/include/root
#LIBS += -L/opt/local/lib/root -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -lm -ldl
INCLUDEPATH += $$system(root-config --incdir)
LIBS += $$system(root-config --libdir)
exists($$(ROOTSYS)/bin/root-config){
INCLUDEPATH += $$system($ROOTSYS/bin/root-config --incdir)
LIBS += $$system($ROOTSYS/bin/root-config --glibs)
}
!exists($$(ROOTSYS)/bin/root-config){
INCLUDEPATH += /opt/local/include/root
LIBS += -L/opt/local/lib/root -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -lm -ldl
}
#############################################################
......
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += \
Core \
......@@ -8,3 +7,5 @@ SUBDIRS += \
TestCore.depends = ThirdParty/gtest
# means that compilation will be in the listed order
CONFIG += ordered
......@@ -26,13 +26,16 @@ HEADERS += \
OBJECTS_DIR = obj
QMAKE_POST_LINK = ln -sf $$mygtest/include .
#QMAKE_POST_LINK = ln -sf $$mygtest/include .
# making copying instead of link since virtual machine has probles in making links while being on host partitions
QMAKE_POST_LINK = cp -r $$mygtest/include .
#target.path = ../../lib
#INSTALLS += target
#QMAKE_CLEAN += $(TARGET) $$target.path/$(TARGET)
QMAKE_DISTCLEAN += -r $(OBJECTS_DIR)
#QMAKE_DISTCLEAN += -r ./include
QMAKE_DISTCLEAN += -r ./include
......@@ -5,25 +5,36 @@ TEMPLATE = app
CONFIG += console
CONFIG -= qt
CONFIG -= app_bundle
CONFIG += build_all
SOURCES += main.cpp \
$$PWD/../../Core/src/OutputData.cpp \
$$PWD/../../Core/src/Exceptions.cpp
INCLUDEPATH += $$PWD/../../ThirdParty/gtest/include ../../Core/inc
LIBS += -L$$PWD/../../ThirdParty/gtest -lgtest
SOURCES += main.cpp
HEADERS += \
NamedVectorTest.h \
OutputDataTest.h
INCLUDEPATH += $$PWD/../../ThirdParty/gtest/include \
$$PWD/../../Core/inc
OBJECTS_DIR = obj
LIBS += -L$$OUT_PWD/../../ThirdParty/gtest -lgtest
LIBS += -L$$OUT_PWD/../../Core -lCore
INCLUDEPATH += $$system($ROOTSYS/bin/root-config --incdir)
LIBS += $$system($ROOTSYS/bin/root-config --glibs)
# some hack that might be required for linux... under investigation
#LIBS += -lpthread
#LDFLAGS = -L/lib64
#QMAKE_CXXFLAGS += -pthread
PRE_TARGETDEPS += $$PWD/../../Core/libCore.dylib
# the projects depends from third party library "google test"
PRE_TARGETDEPS += $$PWD/../../ThirdParty/gtest/libgtest.a
makelibs.target = $$PWD/../../ThirdParty/gtest/libgtest.a
#makelibs.target = $$PWD/../../ThirdParty/gtest/libgtest.a
makelibs.commands = (cd $$PWD/../../ThirdParty/gtest; qmake; make)
makelibs.depends = FORCE
QMAKE_EXTRA_TARGETS += makelibs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment