Merge ssh://ssh.dcc.fc.up.pt:31064/home/vsc/yap

This commit is contained in:
Vitor Santos Costa 2019-04-05 18:47:11 +01:00
commit 30a332b671
4 changed files with 17 additions and 9 deletions

View File

@ -14,8 +14,10 @@ set(MYDDAS_DRIVERS
set(MYDDAS_DBMS sqlite3 postgres odbc)
if (ANDROID)
set (MYDDAS_PL_OUTDIR ${YAP_APP_DIR}/src/generated/assets/Yap )
else()
set (MYDDAS_PL_OUTDIR ${CMAKE_SOURCE_DIR}/../yaplib/src/generated/assets/Yap/myddas )
file(MAKE_DIRECTORY ${MYDDAS_PL_OUTDIR})
file( COPY myddas.yap DESTINATION ${YAP_INSTALL_DATADIR} )
else()
set (MYDDAS_PL_OUTDIR ${CMAKE_CURRENT_BINARY_DIR})
endif()
get_property(MYDDAS_FLAGS GLOBAL PROPERTY COMPILE_DEFINITIONS)
@ -38,7 +40,9 @@ foreach (dbms ${MYDDAS_DBMS} )
set_source_files_properties(outfile PROPERTIES GENERATED TRUE)
endforeach()
list(APPEND MYDDAS_YAP_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../sqlite3/sqlitest.yap ${CMAKE_CURRENT_SOURCE_DIR}/../sqlite3/chinook.db)
install(FILES ${MYDDAS_YAP_FILES} DESTINATION ${YAP_INSTALL_DATADIR})
install(FILES ${MYDDAS_YAP_FILES} DESTINATION ${YAP_INSTALL_DATADIR}/myddas)
install(FILES myddas.yap DESTINATION ${YAP_INSTALL_DATADIR})

View File

@ -0,0 +1 @@
:- include( myddas/myddas ).

View File

@ -41,6 +41,9 @@ message("ql ${EMBEDDED_SQLITE3}")
message( " * Sqlite3 Data-Base (http://www.sqlite3.org), distributed with MYDDAS" )
if ( ANDROID )
add_definitions(-DSQLITE_FCNTL_MMAP_SIZE=0 )
file(MAKE_DIRECTORY ${YAP_INSTALL_DATADIR}/myddas)
file(COPY ${SQLITE_DB} ${SQLITE_TEST}
DESTINATION ${YAP_INSTALL_DATADIR}/myddas)
add_library( YAPsqlite3 OBJECT
${YAPSQLITE3_SOURCES} )
@ -69,12 +72,10 @@ message("ql ${EMBEDDED_SQLITE3}")
)
endif()
install(FILES ${SQLITE_DB}
DESTINATION ${YAP_INSTALL_DATADIR}/data
)
install(FILES ${SQLITE_TEST}
DESTINATION ${YAP_INSTALL_DATADIR}/test
)
install(FILES ${SQLITE_DB} ${SQLITE_TEST}
DESTINATION ${YAP_INSTALL_DATADIR}/myddas
)
endif()

View File

@ -18,3 +18,5 @@ text_to_query( MString, Status ) :-
nl(user_error).
%:- [sqlitest].
user:file_search_path(data, Home) :-
user:file_search_path(library, Home).