##// END OF EJS Templates
Finalize CatalogueAPI integration for windows
perrinel -
r1064:1abdbb67add9
parent child
Show More
@@ -1,169 +1,174
1 ## core - CMakeLists.txt
1 ## core - CMakeLists.txt
2 STRING(TOLOWER ${CMAKE_PROJECT_NAME} LIBRARY_PREFFIX)
2 STRING(TOLOWER ${CMAKE_PROJECT_NAME} LIBRARY_PREFFIX)
3 SET(SQPCORE_LIBRARY_NAME "${LIBRARY_PREFFIX}_core${DEBUG_SUFFIX}")
3 SET(SQPCORE_LIBRARY_NAME "${LIBRARY_PREFFIX}_core${DEBUG_SUFFIX}")
4 SET(SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/")
4 SET(SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/")
5 SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/")
5 SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/")
6 SET(TESTS_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests-resources")
6 SET(TESTS_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests-resources")
7
7
8 # Include core directory
8 # Include core directory
9 include_directories("${INCLUDES_DIR}")
9 include_directories("${INCLUDES_DIR}")
10
10
11 # Set a variable to display a warning in the version files.
11 # Set a variable to display a warning in the version files.
12 SET(SCIQLOP_CMAKE_GENERATION_WARNING "DON'T CHANGE THIS FILE. AUTOGENERATED BY CMAKE.")
12 SET(SCIQLOP_CMAKE_GENERATION_WARNING "DON'T CHANGE THIS FILE. AUTOGENERATED BY CMAKE.")
13 # Generate the version file from the cmake version variables. The version
13 # Generate the version file from the cmake version variables. The version
14 # variables are defined in the cmake/sciqlop_version.cmake file.
14 # variables are defined in the cmake/sciqlop_version.cmake file.
15 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.h.in"
15 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.h.in"
16 "${INCLUDES_DIR}/Version.h")
16 "${INCLUDES_DIR}/Version.h")
17 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.cpp.in"
17 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.cpp.in"
18 "${SOURCES_DIR}/Version.cpp")
18 "${SOURCES_DIR}/Version.cpp")
19
19
20 # Find dependent modules
20 # Find dependent modules
21 find_package(sciqlop-plugin)
21 find_package(sciqlop-plugin)
22 INCLUDE_DIRECTORIES(${SCIQLOP-PLUGIN_INCLUDE_DIR})
22 INCLUDE_DIRECTORIES(${SCIQLOP-PLUGIN_INCLUDE_DIR})
23
23
24 #
24 #
25 # Find Qt modules
25 # Find Qt modules
26 #
26 #
27 SCIQLOP_FIND_QT(Core Network)
27 SCIQLOP_FIND_QT(Core Network)
28
28
29 #
29 #
30 # Compile the library library
30 # Compile the library library
31 #
31 #
32
32
33 ADD_DEFINITIONS(-DCORE_LIB)
33 ADD_DEFINITIONS(-DCORE_LIB)
34
34
35 FILE (GLOB_RECURSE MODULE_SOURCES
35 FILE (GLOB_RECURSE MODULE_SOURCES
36 ${INCLUDES_DIR}/*.h
36 ${INCLUDES_DIR}/*.h
37 ${SOURCES_DIR}/*.c
37 ${SOURCES_DIR}/*.c
38 ${SOURCES_DIR}/*.cpp
38 ${SOURCES_DIR}/*.cpp
39 ${SOURCES_DIR}/*.h)
39 ${SOURCES_DIR}/*.h)
40
40
41 ADD_LIBRARY(${SQPCORE_LIBRARY_NAME} ${MODULE_SOURCES})
41 ADD_LIBRARY(${SQPCORE_LIBRARY_NAME} ${MODULE_SOURCES})
42 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
42 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
43 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
43 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
44 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME})
44 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME})
45 qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core Network)
45 qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core Network)
46
46
47 # Find CATALOGUE_API
47 # Find CATALOGUE_API
48 include_directories("${CATALOGUEAPI_INCLUDE}")
48 include_directories("${CATALOGUEAPI_INCLUDE}")
49 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES})
49 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES})
50 INSTALL(TARGETS ${SQPCORE_LIBRARY_NAME}
50 INSTALL(TARGETS ${SQPCORE_LIBRARY_NAME}
51 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
51 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
52 LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
52 LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
53 ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR}
53 ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR}
54 )
54 )
55
55
56 add_dependencies(${SQPCORE_LIBRARY_NAME} CatalogueAPI)
56 add_dependencies(${SQPCORE_LIBRARY_NAME} CatalogueAPI)
57
57
58 # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html
58 # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html
59 # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order.
59 # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order.
60 # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets
60 # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets
61 IF(BUILD_SHARED_LIBS)
61 IF(BUILD_SHARED_LIBS)
62 SET_TARGET_PROPERTIES(${SQPCORE_LIBRARY_NAME} PROPERTIES COMPILE_DEFINITIONS "SCIQLOP_EXPORT")
62 SET_TARGET_PROPERTIES(${SQPCORE_LIBRARY_NAME} PROPERTIES COMPILE_DEFINITIONS "SCIQLOP_EXPORT")
63 ELSE()
63 ELSE()
64 TARGET_COMPILE_DEFINITIONS(${SQPCORE_LIBRARY_NAME} PUBLIC "SCIQLOP_STATIC_LIBRARIES")
64 TARGET_COMPILE_DEFINITIONS(${SQPCORE_LIBRARY_NAME} PUBLIC "SCIQLOP_STATIC_LIBRARIES")
65 ENDIF()
65 ENDIF()
66
66
67 # Set the variable to parent scope so that the other projects can copy the
67 # Set the variable to parent scope so that the other projects can copy the
68 # dependent shared libraries
68 # dependent shared libraries
69 SCIQLOP_SET_TO_PARENT_SCOPE(SQPCORE_LIBRARY_NAME)
69 SCIQLOP_SET_TO_PARENT_SCOPE(SQPCORE_LIBRARY_NAME)
70
70
71 ## Copy extern shared libraries to the lib folder
71 ## Copy extern shared libraries to the lib folder
72 #LIST (APPEND ${EXTERN_SHARED_LIBRARIES} ${CATALOGUEAPI_LIBRARIES})
72 LIST (APPEND ${EXTERN_SHARED_LIBRARIES} ${CATALOGUEAPI_LIBRARIES})
73
73
74 #SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES})
74
75 #if(APPLE)
75 SET (COPY_LIBS_DESTINATION LIBRARY)
76 #SCIQLOP_COPY_TO_TARGET(RUNTIME ${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES})
76 if(APPLE)
77 #endif()
77 SET (COPY_LIBS_DESTINATION RUNTIME)
78 endif()
79
80 add_custom_command(TARGET ${SQPCORE_LIBRARY_NAME} POST_BUILD
81 COMMAND ${CMAKE_COMMAND} -E copy ${CATALOGUEAPI_LIBRARIES} ${EXECUTABLE_OUTPUT_PATH}
82 )
78
83
79 # Add the files to the list of files to be analyzed
84 # Add the files to the list of files to be analyzed
80 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
85 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
81 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
86 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
82 # Vera++ exclusion files
87 # Vera++ exclusion files
83 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
88 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
84 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
89 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
85
90
86 #
91 #
87 # Compile the tests
92 # Compile the tests
88 #
93 #
89 IF(BUILD_TESTS)
94 IF(BUILD_TESTS)
90 INCLUDE_DIRECTORIES(${SOURCES_DIR})
95 INCLUDE_DIRECTORIES(${SOURCES_DIR})
91 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
96 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
92 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
97 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
93 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME})
98 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME})
94 list(APPEND TEST_LIBRARIES ${CATALOGUEAPI_LIBRARIES})
99 list(APPEND TEST_LIBRARIES ${CATALOGUEAPI_LIBRARIES})
95
100
96 SET(TARGETS_COV)
101 SET(TARGETS_COV)
97 FOREACH( testFile ${TESTS_SOURCES} )
102 FOREACH( testFile ${TESTS_SOURCES} )
98 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
103 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
99 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
104 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
100
105
101 # Add to the list of sources files all the sources in the same
106 # Add to the list of sources files all the sources in the same
102 # directory that aren't another test
107 # directory that aren't another test
103 FILE (GLOB currentTestSources
108 FILE (GLOB currentTestSources
104 ${testDirectory}/*.c
109 ${testDirectory}/*.c
105 ${testDirectory}/*.cpp
110 ${testDirectory}/*.cpp
106 ${testDirectory}/*.h)
111 ${testDirectory}/*.h)
107 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
112 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
108 # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
113 # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
109
114
110 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
115 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
111 set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14)
116 set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14)
112 set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON)
117 set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON)
113 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES})
118 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES})
114 qt5_use_modules(${testName} Test)
119 qt5_use_modules(${testName} Test)
115
120
116 ADD_TEST( NAME ${testName} COMMAND ${testName} )
121 ADD_TEST( NAME ${testName} COMMAND ${testName} )
117
122
118 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${CATALOGUEAPI_LIBRARIES})
123 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${CATALOGUEAPI_LIBRARIES})
119 set(Coverage_NAME ${testName})
124 set(Coverage_NAME ${testName})
120 if(UNIX)
125 if(UNIX)
121 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
126 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
122 LIST( APPEND TARGETS_COV ${testName}_coverage)
127 LIST( APPEND TARGETS_COV ${testName}_coverage)
123 endif(UNIX)
128 endif(UNIX)
124
129
125 ENDFOREACH( testFile )
130 ENDFOREACH( testFile )
126
131
127 add_custom_target(coverage)
132 add_custom_target(coverage)
128
133
129 FOREACH( target_cov ${TARGETS_COV} )
134 FOREACH( target_cov ${TARGETS_COV} )
130 add_custom_command(TARGET coverage PRE_BUILD COMMAND make ${target_cov})
135 add_custom_command(TARGET coverage PRE_BUILD COMMAND make ${target_cov})
131 ENDFOREACH( target_cov )
136 ENDFOREACH( target_cov )
132
137
133 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
138 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
134 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
139 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
135 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
140 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
136 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
141 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
137
142
138 ADD_DEFINITIONS(-DCORE_TESTS_RESOURCES_DIR="${TESTS_RESOURCES_DIR}")
143 ADD_DEFINITIONS(-DCORE_TESTS_RESOURCES_DIR="${TESTS_RESOURCES_DIR}")
139 ENDIF(BUILD_TESTS)
144 ENDIF(BUILD_TESTS)
140
145
141 #
146 #
142 # Set the files that must be formatted by clang-format.
147 # Set the files that must be formatted by clang-format.
143 #
148 #
144 LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES})
149 LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES})
145 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
150 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
146
151
147 #
152 #
148 # Set the directories that doxygen must browse to generate the
153 # Set the directories that doxygen must browse to generate the
149 # documentation.
154 # documentation.
150 #
155 #
151 # Source directories:
156 # Source directories:
152 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
157 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
153 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
158 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
154 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
159 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
155 # Source directories to exclude from the documentation generation
160 # Source directories to exclude from the documentation generation
156 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
161 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
157 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
162 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
158
163
159 #
164 #
160 # Set the directories with the sources to analyze and propagate the
165 # Set the directories with the sources to analyze and propagate the
161 # modification to the parent scope
166 # modification to the parent scope
162 #
167 #
163 # Source directories to analyze:
168 # Source directories to analyze:
164 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
169 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
165 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
170 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
166 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
171 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
167 # Source directories to exclude from the analysis
172 # Source directories to exclude from the analysis
168 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
173 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
169 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
174 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
@@ -1,79 +1,73
1 # - Clone and build CatalogueAPI Module
1 # - Clone and build CatalogueAPI Module
2 include(ExternalProject)
2 include(ExternalProject)
3
3
4 find_package(Git REQUIRED)
4 find_package(Git REQUIRED)
5
5
6 if(WIN32)
6 if(WIN32)
7 find_program(MesonExec meson PATHS C:/Appli/Meson)
7 find_program(MesonExec meson PATHS C:/Appli/Meson)
8 if(NOT MesonExec)
8 if(NOT MesonExec)
9 Message("Error: Meson not found")
9 Message("Error: Meson not found")
10 else()
10 else()
11 message("Meson found: ${MesonExec}" )
11 message("Meson found: ${MesonExec}" )
12 endif()
12 endif()
13 find_program(NinjaExec ninja PATHS C:/Appli/Meson)
13 find_program(NinjaExec ninja PATHS C:/Appli/Meson)
14 if(NOT NinjaExec)
14 if(NOT NinjaExec)
15 Message("Error: Ninja not found")
15 Message("Error: Ninja not found")
16 else()
16 else()
17 message("Ninja found: ${NinjaExec}" )
17 message("Ninja found: ${NinjaExec}" )
18 endif()
18 endif()
19 endif()
19 endif()
20 if(NOT MesonExec)
20 if(NOT MesonExec)
21 set (MesonExec meson)
21 set (MesonExec meson)
22 endif()
22 endif()
23 if(NOT NinjaExec)
23 if(NOT NinjaExec)
24 set (NinjaExec ninja)
24 set (NinjaExec ninja)
25 endif()
25 endif()
26
26
27 SET(CATALOGUEAPI_SOURCES_PATH ${CMAKE_SOURCE_DIR}/3rdparty/CatalogueAPI)
27 SET(CATALOGUEAPI_SOURCES_PATH ${CMAKE_SOURCE_DIR}/3rdparty/CatalogueAPI)
28 SET(CATALOGUEAPI_BUILD_PATH ${CATALOGUEAPI_SOURCES_PATH}/build)
28 SET(CATALOGUEAPI_BUILD_PATH ${CATALOGUEAPI_SOURCES_PATH}/build)
29 SET(CATALOGUEAPI_QXORM_LIB_PATH ${CATALOGUEAPI_BUILD_PATH}/subprojects/QxOrm)
29 SET(CATALOGUEAPI_QXORM_LIB_PATH ${CATALOGUEAPI_BUILD_PATH}/subprojects/QxOrm)
30 SET(CatalogueAPI_build_type plain)
30 SET(CatalogueAPI_build_type plain)
31
31
32 if(CMAKE_BUILD_TYPE STREQUAL "")
32 if(CMAKE_BUILD_TYPE STREQUAL "")
33 set(CMAKE_BUILD_TYPE Release)
33 set(CMAKE_BUILD_TYPE Release)
34 endif()
34 endif()
35 string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
35 string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
36
36
37 ExternalProject_Add(
37 ExternalProject_Add(
38 CatalogueAPI
38 CatalogueAPI
39
39
40 GIT_REPOSITORY https://perrinel@hephaistos.lpp.polytechnique.fr/rhodecode/GIT_REPOSITORIES/LPP/Users/mperrinel/CatalogueAPI
40 GIT_REPOSITORY https://perrinel@hephaistos.lpp.polytechnique.fr/rhodecode/GIT_REPOSITORIES/LPP/Users/mperrinel/CatalogueAPI
41 GIT_TAG develop
41 GIT_TAG develop
42
42
43 UPDATE_COMMAND ${GIT_EXECUTABLE} pull
43 UPDATE_COMMAND ${GIT_EXECUTABLE} pull
44 PATCH_COMMAND ""
44 PATCH_COMMAND ""
45
45
46 SOURCE_DIR "${CATALOGUEAPI_SOURCES_PATH}"
46 SOURCE_DIR "${CATALOGUEAPI_SOURCES_PATH}"
47 CONFIGURE_COMMAND ${MesonExec} --prefix=${CATALOGUEAPI_SOURCES_PATH} --buildtype=${CMAKE_BUILD_TYPE_TOLOWER} "${CATALOGUEAPI_SOURCES_PATH}" "${CATALOGUEAPI_BUILD_PATH}"
47 CONFIGURE_COMMAND ${MesonExec} --prefix=${CATALOGUEAPI_SOURCES_PATH} --buildtype=${CMAKE_BUILD_TYPE_TOLOWER} "${CATALOGUEAPI_SOURCES_PATH}" "${CATALOGUEAPI_BUILD_PATH}"
48
48
49 BUILD_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}"
49 BUILD_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}"
50 INSTALL_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}" install
50 INSTALL_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}" install
51 TEST_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}" test
52 LOG_DOWNLOAD 1
51 LOG_DOWNLOAD 1
53 LOG_UPDATE 1
52 LOG_UPDATE 1
54 )
53 )
55
54
56 set(CATALOG_LIB_PATH lib)
55 set(CATALOG_LIB_PATH lib)
57 if(WIN32)
56 if(WIN32)
58 set(CATALOG_LIB_PATH bin)
57 set(CATALOG_LIB_PATH bin)
59 endif()
58 endif()
60
59
61 ExternalProject_Add_Step(
60 ExternalProject_Add_Step(
62 CatalogueAPI CopyToBin
61 CatalogueAPI CopyToBin
63 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_SOURCES_PATH}/lib64 ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}
62 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_SOURCES_PATH}/lib64 ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}
64 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_QXORM_LIB_PATH} ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}
63 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_QXORM_LIB_PATH} ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}
65 DEPENDEES install
64 DEPENDEES install
66 )
65 )
67
66
68
67
69 set(CATALOGUEAPI_INCLUDE ${CATALOGUEAPI_SOURCES_PATH}/src)
68 set(CATALOGUEAPI_INCLUDE ${CATALOGUEAPI_SOURCES_PATH}/src)
70 set(CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}CatalogueAPI${CMAKE_SHARED_LIBRARY_SUFFIX})
69 set(CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}CatalogueAPI${CMAKE_SHARED_LIBRARY_SUFFIX})
71 list(APPEND CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}QxOrm${CMAKE_SHARED_LIBRARY_SUFFIX})
70 list(APPEND CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}QxOrm${CMAKE_SHARED_LIBRARY_SUFFIX})
72
71
73 #message("CMAKE_SHARED_LIBRARY_PREFIX: ${CMAKE_SHARED_LIBRARY_PREFIX}")
74 #message("CMAKE_SHARED_LIBRARY_SUFFIX: ${CMAKE_SHARED_LIBRARY_SUFFIX}")
75 #message("CATALOGUEAPI_INCLUDE: ${CATALOGUEAPI_INCLUDE}")
76 #message("CATALOGUEAPI_LIBRARIES: ${CATALOGUEAPI_LIBRARIES}")
77
78 mark_as_advanced(CATALOGUEAPI_INCLUDE)
72 mark_as_advanced(CATALOGUEAPI_INCLUDE)
79 mark_as_advanced(CATALOGUEAPI_LIBRARIES)
73 mark_as_advanced(CATALOGUEAPI_LIBRARIES)
General Comments 0
You need to be logged in to leave comments. Login now