|
@@ -24,6 +24,7 @@ set(LEMMA_VERSION_NOQUOTES "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}.${LEMM
|
24
|
24
|
## Options--what do you want to do
|
25
|
25
|
option ( BUILD_SHARED_LIBS "Shared or static libraries" OFF )
|
26
|
26
|
|
|
27
|
+# If CMAKE_BUILD_TYPE is not specified, assume Release.
|
27
|
28
|
IF( NOT CMAKE_BUILD_TYPE )
|
28
|
29
|
SET( CMAKE_BUILD_TYPE Release ... FORCE )
|
29
|
30
|
ENDIF()
|
|
@@ -39,6 +40,7 @@ option (LEMMA_VTK8_SUPPORT "VTK 8.x library for visualisation and grids" OFF)
|
39
|
40
|
|
40
|
41
|
#option (CMAKE_CROSSCOMPILING "Target different arch than you are on" OFF)
|
41
|
42
|
|
|
43
|
+SET (CMAKE_CROSSCOMPILING TRUE)
|
42
|
44
|
|
43
|
45
|
##########################################################################################
|
44
|
46
|
## Only look for packages where we build them...this makes finding VTK a problem though! #
|
|
@@ -47,22 +49,29 @@ if (CMAKE_CROSSCOMPILING)
|
47
|
49
|
message ( STATUS "Cross-compiling! Only searching in install directory for components." )
|
48
|
50
|
# Kind of hack-ish, CMake doesn't always find this. It's buried in Cross compilation, so,
|
49
|
51
|
# hopefully anyone doing this can problem solve.
|
50
|
|
- SET( CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/CMake ${CMAKE_INSTALL_PREFIX}/share/eigen3 )
|
51
|
|
- #SET( CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX} )
|
52
|
|
- SET( CMAKE_FIND_ROOT_PATH ONLY ${CMAKE_INSTALL_PREFIX})
|
53
|
|
- SET( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
|
54
|
|
- SET( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
|
55
|
|
- SET( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
|
56
|
|
- UNSET( Eigen3_DIR CACHE )
|
57
|
|
- UNSET( yaml-cpp_DIR CACHE )
|
58
|
|
- UNSET( Eigen3_FOUND CACHE )
|
59
|
|
- UNSET( yaml-cpp_FOUND CACHE )
|
60
|
|
- find_package (yaml-cpp 0.6 PATHS ${CMAKE_INSTALL_PREFIX} ) #QUIET ) # Serialisation of classes
|
61
|
|
- find_package (Eigen3 3.3 PATHS ${CMAKE_INSTALL_PREFIX} ) # QUIET) # Matrix/Vector & Math
|
62
|
|
-endif()
|
|
52
|
+ # SET( CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/CMake ${CMAKE_INSTALL_PREFIX}/share/eigen3 )
|
|
53
|
+
|
|
54
|
+ # SET( CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX} )
|
|
55
|
+ # SET( CMAKE_FIND_ROOT_PATH ONLY ${CMAKE_INSTALL_PREFIX} )
|
|
56
|
+ # SET( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
|
|
57
|
+ # SET( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
|
|
58
|
+ # SET( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
|
|
59
|
+
|
|
60
|
+ # UNSET( Eigen3_DIR CACHE )
|
|
61
|
+ # UNSET( yaml-cpp_DIR CACHE )
|
|
62
|
+ # UNSET( Eigen3_FOUND CACHE )
|
|
63
|
+ # UNSET( yaml-cpp_FOUND CACHE )
|
63
|
64
|
|
64
|
|
-find_package (Eigen3 3.3 QUIET) # Matrix/Vector & Math
|
65
|
|
-find_package (yaml-cpp 0.6 QUIET ) # Serialisation of classes
|
|
65
|
+ #message( STATUS "........Looking for yaml-cpp in ${CMAKE_INSTALL_PREFIX}" )
|
|
66
|
+
|
|
67
|
+ find_package (yaml-cpp 0.6 PATHS ${CMAKE_INSTALL_PREFIX} NO_DEFAULT_PATH ) # Serialisation of classes
|
|
68
|
+ find_package (Eigen3 3.3 PATHS ${CMAKE_INSTALL_PREFIX} NO_DEFAULT_PATH ) # Matrix/Vector & Math
|
|
69
|
+
|
|
70
|
+ #message( STATUS "yaml-cpp include dir ${YAML_CPP_INCLUDE_DIR}" )
|
|
71
|
+else()
|
|
72
|
+ find_package (Eigen3 3.3 QUIET) # Matrix/Vector & Math
|
|
73
|
+ find_package (yaml-cpp 0.6 QUIET ) # Serialisation of classes
|
|
74
|
+endif()
|
66
|
75
|
|
67
|
76
|
INCLUDE_DIRECTORIES(${YAML_CPP_INCLUDE_DIR})
|
68
|
77
|
|