##// END OF EJS Templates
Update externalproject for windows compatibility
perrinel -
r1063:853587fd5b42
parent child
Show More
@@ -75,7 +75,6 SCIQLOP_SET_TO_PARENT_SCOPE(SQPCORE_LIBRARY_NAME)
75 75 #if(APPLE)
76 76 #SCIQLOP_COPY_TO_TARGET(RUNTIME ${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES})
77 77 #endif()
78 #SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPCORE_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES})
79 78
80 79 # Add the files to the list of files to be analyzed
81 80 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
@@ -116,7 +115,7 IF(BUILD_TESTS)
116 115
117 116 ADD_TEST( NAME ${testName} COMMAND ${testName} )
118 117
119 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES})
118 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${CATALOGUEAPI_LIBRARIES})
120 119 set(Coverage_NAME ${testName})
121 120 if(UNIX)
122 121 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
@@ -3,11 +3,35 include(ExternalProject)
3 3
4 4 find_package(Git REQUIRED)
5 5
6 if(WIN32)
7 find_program(MesonExec meson PATHS C:/Appli/Meson)
8 if(NOT MesonExec)
9 Message("Error: Meson not found")
10 else()
11 message("Meson found: ${MesonExec}" )
12 endif()
13 find_program(NinjaExec ninja PATHS C:/Appli/Meson)
14 if(NOT NinjaExec)
15 Message("Error: Ninja not found")
16 else()
17 message("Ninja found: ${NinjaExec}" )
18 endif()
19 endif()
20 if(NOT MesonExec)
21 set (MesonExec meson)
22 endif()
23 if(NOT NinjaExec)
24 set (NinjaExec ninja)
25 endif()
26
6 27 SET(CATALOGUEAPI_SOURCES_PATH ${CMAKE_SOURCE_DIR}/3rdparty/CatalogueAPI)
7 28 SET(CATALOGUEAPI_BUILD_PATH ${CATALOGUEAPI_SOURCES_PATH}/build)
8 29 SET(CATALOGUEAPI_QXORM_LIB_PATH ${CATALOGUEAPI_BUILD_PATH}/subprojects/QxOrm)
9 30 SET(CatalogueAPI_build_type plain)
10 31
32 if(CMAKE_BUILD_TYPE STREQUAL "")
33 set(CMAKE_BUILD_TYPE Release)
34 endif()
11 35 string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
12 36
13 37 ExternalProject_Add(
@@ -16,30 +40,35 ExternalProject_Add(
16 40 GIT_REPOSITORY https://perrinel@hephaistos.lpp.polytechnique.fr/rhodecode/GIT_REPOSITORIES/LPP/Users/mperrinel/CatalogueAPI
17 41 GIT_TAG develop
18 42
19 UPDATE_COMMAND git pull
43 UPDATE_COMMAND ${GIT_EXECUTABLE} pull
20 44 PATCH_COMMAND ""
21 45
22 46 SOURCE_DIR "${CATALOGUEAPI_SOURCES_PATH}"
23 CONFIGURE_COMMAND meson --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}"
24 48
25 BUILD_COMMAND ninja -C "${CATALOGUEAPI_BUILD_PATH}"
26 INSTALL_COMMAND ninja -C "${CATALOGUEAPI_BUILD_PATH}" install
27 TEST_COMMAND ninja -C "${CATALOGUEAPI_BUILD_PATH}" test
49 BUILD_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}"
50 INSTALL_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}" install
51 TEST_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}" test
28 52 LOG_DOWNLOAD 1
29 53 LOG_UPDATE 1
30 54 )
31 55
56 set(CATALOG_LIB_PATH lib)
57 if(WIN32)
58 set(CATALOG_LIB_PATH bin)
59 endif()
60
32 61 ExternalProject_Add_Step(
33 62 CatalogueAPI CopyToBin
34 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_SOURCES_PATH}/lib64 ${CATALOGUEAPI_SOURCES_PATH}/lib
35 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_QXORM_LIB_PATH} ${CATALOGUEAPI_SOURCES_PATH}/lib
63 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}
36 65 DEPENDEES install
37 66 )
38 67
39 68
40 69 set(CATALOGUEAPI_INCLUDE ${CATALOGUEAPI_SOURCES_PATH}/src)
41 set(CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}CatalogueAPI${CMAKE_SHARED_LIBRARY_SUFFIX})
42 list(APPEND CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}QxOrm${CMAKE_SHARED_LIBRARY_SUFFIX})
70 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})
43 72
44 73 #message("CMAKE_SHARED_LIBRARY_PREFIX: ${CMAKE_SHARED_LIBRARY_PREFIX}")
45 74 #message("CMAKE_SHARED_LIBRARY_SUFFIX: ${CMAKE_SHARED_LIBRARY_SUFFIX}")
General Comments 0
You need to be logged in to leave comments. Login now