Skip to content
Snippets Groups Projects
Commit d543cebd authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Install .h files from Fit and WinDllMacros.h to /usr/local/include so that...

Install .h files from Fit and WinDllMacros.h to /usr/local/include so that they can be used by cpp example.
Restore CMake machinery for cpp example.
parent e5eeaf4a
No related branches found
No related tags found
No related merge requests found
......@@ -173,6 +173,7 @@ install (DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/cpp DESTINATION ${destination_ex
install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries)
install (FILES ${CMAKE_BINARY_DIR}/lib/lib${library_name}.py DESTINATION ${destination_lib} COMPONENT Libraries) # required by swig
install (FILES ${include_files} DESTINATION ${destination_include} COMPONENT Headers)
install (FILES ${CMAKE_SOURCE_DIR}/Wrap/WinDllMacros.h DESTINATION ${destination_include} COMPONENT Headers)
if(WIN32)
# python in windows required .pyd extention for the library name
......
......@@ -7,33 +7,15 @@ add_executable(CylindersAndPrisms CylindersAndPrisms.cpp)
# path to the cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/modules)
# Find libraries
# --- Eigen3 ---
find_package(Eigen3 3.1.0 REQUIRED)
# --- BOOST ---
set(boost_libraries_required date_time chrono program_options iostreams system filesystem regex thread)
find_package(Boost 1.48.0 COMPONENTS ${boost_libraries_required} REQUIRED)
message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}")
message(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
# --- BornAgain ---
# find libraries
find_package(BornAgain REQUIRED)
#-----ROOT------------
find_package(ROOT REQUIRED)
find_package(Eigen3 REQUIRED)
include_directories(
${Boost_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${ROOT_INCLUDE_DIR}
${BORNAGAIN_INCLUDE_DIR}
)
target_link_libraries(CylindersAndPrisms
${Boost_LIBRARIES}
${BORNAGAIN_LIBRARIES}
${ROOT_LIBRARIES}
)
......@@ -8,15 +8,6 @@
#include "FormFactorPrism3.h"
#include "Units.h"
#include "TCanvas.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TH3D.h"
#include "TStyle.h"
#include "TLine.h"
#include "TROOT.h"
#include "TApplication.h"
#include "CylindersAndPrisms.h"
......@@ -73,6 +64,7 @@ void CylindersAndPrismsExample::runSimulation()
void CylindersAndPrismsExample::drawResult()
{
/*
const IAxis *axisPhi = m_result->getAxis(0);
const IAxis *axisAlpha = m_result->getAxis(1);
......@@ -112,18 +104,14 @@ void CylindersAndPrismsExample::drawResult()
delete axisPhi;
delete axisAlpha;
delete hist;
*/
}
int main(int argc, char **argv)
{
CylindersAndPrismsExample* example = new CylindersAndPrismsExample();
example->runSimulation();
TApplication *theApp = new TApplication("theApp", &argc, argv);
example->drawResult();
theApp->Run();
delete example;
CylindersAndPrismsExample example;
example.runSimulation();
example.drawResult();
return 0;
}
#ifndef CYLINDERSANDPRISMS_H_
#define CYLINDERSANDPRISMS_H_
#ifndef CYLINDERSANDPRISMS_H
#define CYLINDERSANDPRISMS_H
// Mixture of cylinders and prisms without interference (IsGISAXS example ex-1)
#include "OutputData.h"
......@@ -25,4 +25,4 @@ private:
MultiLayer *m_sample;
};
#endif /* CYLINDERSANDPRISMS_H_ */
#endif // CYLINDERSANDPRISMS_H
......@@ -10,12 +10,12 @@ if(BORNAGAINSYS)
set(BORNAGAIN_INCLUDE_DIR ${BORNAGAINSYS}/include/BornAgain-1.6)
endif()
find_library (BORNAGAIN_CORE BornAgainCore
find_library (BORNAGAIN_CORE _libBornAgainCore.so
PATHS ${BORNAGAIN_LIBRARY_DIR}
HINTS ${BORNAGAIN_LIBRARY_DIR}
)
find_library (BORNAGAIN_FIT BornAgainFit
find_library (BORNAGAIN_FIT _libBornAgainFit.so
PATHS ${BORNAGAIN_LIBRARY_DIR}
HINTS ${BORNAGAIN_LIBRARY_DIR}
)
......
......@@ -158,6 +158,7 @@ endif()
install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries)
install (FILES ${fitkernel_include_files} DESTINATION ${destination_include} COMPONENT Headers)
install (FILES ${CMAKE_BINARY_DIR}/lib/lib${library_name}.py DESTINATION ${destination_lib} COMPONENT Libraries) # required by SWIG
install (FILES ${include_files} DESTINATION ${destination_include} COMPONENT Headers)
if(WIN32)
if(BORNAGAIN_PYTHON)
......
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