##// END OF EJS Templates
Update externalproject for windows compatibility
perrinel -
r1063:853587fd5b42
parent child
Show More
@@ -1,170 +1,169
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 #SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES})
75 #if(APPLE)
75 #if(APPLE)
76 #SCIQLOP_COPY_TO_TARGET(RUNTIME ${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES})
76 #SCIQLOP_COPY_TO_TARGET(RUNTIME ${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES})
77 #endif()
77 #endif()
78 #SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPCORE_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES})
79
78
80 # Add the files to the list of files to be analyzed
79 # Add the files to the list of files to be analyzed
81 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
80 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
82 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
81 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
83 # Vera++ exclusion files
82 # Vera++ exclusion files
84 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
83 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
85 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
84 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
86
85
87 #
86 #
88 # Compile the tests
87 # Compile the tests
89 #
88 #
90 IF(BUILD_TESTS)
89 IF(BUILD_TESTS)
91 INCLUDE_DIRECTORIES(${SOURCES_DIR})
90 INCLUDE_DIRECTORIES(${SOURCES_DIR})
92 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
91 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
93 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
92 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
94 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME})
93 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME})
95 list(APPEND TEST_LIBRARIES ${CATALOGUEAPI_LIBRARIES})
94 list(APPEND TEST_LIBRARIES ${CATALOGUEAPI_LIBRARIES})
96
95
97 SET(TARGETS_COV)
96 SET(TARGETS_COV)
98 FOREACH( testFile ${TESTS_SOURCES} )
97 FOREACH( testFile ${TESTS_SOURCES} )
99 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
98 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
100 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
99 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
101
100
102 # Add to the list of sources files all the sources in the same
101 # Add to the list of sources files all the sources in the same
103 # directory that aren't another test
102 # directory that aren't another test
104 FILE (GLOB currentTestSources
103 FILE (GLOB currentTestSources
105 ${testDirectory}/*.c
104 ${testDirectory}/*.c
106 ${testDirectory}/*.cpp
105 ${testDirectory}/*.cpp
107 ${testDirectory}/*.h)
106 ${testDirectory}/*.h)
108 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
107 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
109 # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
108 # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
110
109
111 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
110 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
112 set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14)
111 set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14)
113 set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON)
112 set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON)
114 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES})
113 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES})
115 qt5_use_modules(${testName} Test)
114 qt5_use_modules(${testName} Test)
116
115
117 ADD_TEST( NAME ${testName} COMMAND ${testName} )
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 set(Coverage_NAME ${testName})
119 set(Coverage_NAME ${testName})
121 if(UNIX)
120 if(UNIX)
122 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
121 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
123 LIST( APPEND TARGETS_COV ${testName}_coverage)
122 LIST( APPEND TARGETS_COV ${testName}_coverage)
124 endif(UNIX)
123 endif(UNIX)
125
124
126 ENDFOREACH( testFile )
125 ENDFOREACH( testFile )
127
126
128 add_custom_target(coverage)
127 add_custom_target(coverage)
129
128
130 FOREACH( target_cov ${TARGETS_COV} )
129 FOREACH( target_cov ${TARGETS_COV} )
131 add_custom_command(TARGET coverage PRE_BUILD COMMAND make ${target_cov})
130 add_custom_command(TARGET coverage PRE_BUILD COMMAND make ${target_cov})
132 ENDFOREACH( target_cov )
131 ENDFOREACH( target_cov )
133
132
134 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
133 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
135 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
134 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
136 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
135 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
137 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
136 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
138
137
139 ADD_DEFINITIONS(-DCORE_TESTS_RESOURCES_DIR="${TESTS_RESOURCES_DIR}")
138 ADD_DEFINITIONS(-DCORE_TESTS_RESOURCES_DIR="${TESTS_RESOURCES_DIR}")
140 ENDIF(BUILD_TESTS)
139 ENDIF(BUILD_TESTS)
141
140
142 #
141 #
143 # Set the files that must be formatted by clang-format.
142 # Set the files that must be formatted by clang-format.
144 #
143 #
145 LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES})
144 LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES})
146 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
145 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
147
146
148 #
147 #
149 # Set the directories that doxygen must browse to generate the
148 # Set the directories that doxygen must browse to generate the
150 # documentation.
149 # documentation.
151 #
150 #
152 # Source directories:
151 # Source directories:
153 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
152 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
154 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
153 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
155 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
154 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
156 # Source directories to exclude from the documentation generation
155 # Source directories to exclude from the documentation generation
157 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
156 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
158 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
157 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
159
158
160 #
159 #
161 # Set the directories with the sources to analyze and propagate the
160 # Set the directories with the sources to analyze and propagate the
162 # modification to the parent scope
161 # modification to the parent scope
163 #
162 #
164 # Source directories to analyze:
163 # Source directories to analyze:
165 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
164 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
166 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
165 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
167 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
166 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
168 # Source directories to exclude from the analysis
167 # Source directories to exclude from the analysis
169 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
168 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
170 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
169 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
@@ -1,50 +1,79
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)
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 SET(CATALOGUEAPI_SOURCES_PATH ${CMAKE_SOURCE_DIR}/3rdparty/CatalogueAPI)
27 SET(CATALOGUEAPI_SOURCES_PATH ${CMAKE_SOURCE_DIR}/3rdparty/CatalogueAPI)
7 SET(CATALOGUEAPI_BUILD_PATH ${CATALOGUEAPI_SOURCES_PATH}/build)
28 SET(CATALOGUEAPI_BUILD_PATH ${CATALOGUEAPI_SOURCES_PATH}/build)
8 SET(CATALOGUEAPI_QXORM_LIB_PATH ${CATALOGUEAPI_BUILD_PATH}/subprojects/QxOrm)
29 SET(CATALOGUEAPI_QXORM_LIB_PATH ${CATALOGUEAPI_BUILD_PATH}/subprojects/QxOrm)
9 SET(CatalogueAPI_build_type plain)
30 SET(CatalogueAPI_build_type plain)
10
31
32 if(CMAKE_BUILD_TYPE STREQUAL "")
33 set(CMAKE_BUILD_TYPE Release)
34 endif()
11 string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
35 string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
12
36
13 ExternalProject_Add(
37 ExternalProject_Add(
14 CatalogueAPI
38 CatalogueAPI
15
39
16 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
17 GIT_TAG develop
41 GIT_TAG develop
18
42
19 UPDATE_COMMAND git pull
43 UPDATE_COMMAND ${GIT_EXECUTABLE} pull
20 PATCH_COMMAND ""
44 PATCH_COMMAND ""
21
45
22 SOURCE_DIR "${CATALOGUEAPI_SOURCES_PATH}"
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}"
49 BUILD_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}"
26 INSTALL_COMMAND ninja -C "${CATALOGUEAPI_BUILD_PATH}" install
50 INSTALL_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}" install
27 TEST_COMMAND ninja -C "${CATALOGUEAPI_BUILD_PATH}" test
51 TEST_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}" test
28 LOG_DOWNLOAD 1
52 LOG_DOWNLOAD 1
29 LOG_UPDATE 1
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 ExternalProject_Add_Step(
61 ExternalProject_Add_Step(
33 CatalogueAPI CopyToBin
62 CatalogueAPI CopyToBin
34 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_SOURCES_PATH}/lib64 ${CATALOGUEAPI_SOURCES_PATH}/lib
63 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_SOURCES_PATH}/lib64 ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}
35 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_QXORM_LIB_PATH} ${CATALOGUEAPI_SOURCES_PATH}/lib
64 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_QXORM_LIB_PATH} ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}
36 DEPENDEES install
65 DEPENDEES install
37 )
66 )
38
67
39
68
40 set(CATALOGUEAPI_INCLUDE ${CATALOGUEAPI_SOURCES_PATH}/src)
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})
70 set(CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}/${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})
71 list(APPEND CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}QxOrm${CMAKE_SHARED_LIBRARY_SUFFIX})
43
72
44 #message("CMAKE_SHARED_LIBRARY_PREFIX: ${CMAKE_SHARED_LIBRARY_PREFIX}")
73 #message("CMAKE_SHARED_LIBRARY_PREFIX: ${CMAKE_SHARED_LIBRARY_PREFIX}")
45 #message("CMAKE_SHARED_LIBRARY_SUFFIX: ${CMAKE_SHARED_LIBRARY_SUFFIX}")
74 #message("CMAKE_SHARED_LIBRARY_SUFFIX: ${CMAKE_SHARED_LIBRARY_SUFFIX}")
46 #message("CATALOGUEAPI_INCLUDE: ${CATALOGUEAPI_INCLUDE}")
75 #message("CATALOGUEAPI_INCLUDE: ${CATALOGUEAPI_INCLUDE}")
47 #message("CATALOGUEAPI_LIBRARIES: ${CATALOGUEAPI_LIBRARIES}")
76 #message("CATALOGUEAPI_LIBRARIES: ${CATALOGUEAPI_LIBRARIES}")
48
77
49 mark_as_advanced(CATALOGUEAPI_INCLUDE)
78 mark_as_advanced(CATALOGUEAPI_INCLUDE)
50 mark_as_advanced(CATALOGUEAPI_LIBRARIES)
79 mark_as_advanced(CATALOGUEAPI_LIBRARIES)
General Comments 0
You need to be logged in to leave comments. Login now