cmake runtime install support (headers+libs)

This commit is contained in:
Marian Krivos 2009-02-18 20:47:32 +00:00
parent 12c1ae5823
commit 16cdb4b127
15 changed files with 200 additions and 10 deletions

View File

@ -49,4 +49,4 @@ endif(OPENSSL_FOUND)
add_subdirectory(Data)
add_subdirectory(WebWidgets)
add_subdirectory(Zip)
add_subdirectory(ApacheConnector)
#add_subdirectory(ApacheConnector)

View File

@ -18,3 +18,13 @@ set_target_properties( ${LIBNAMED}
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} ssl crypto)
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)

View File

@ -18,5 +18,22 @@ set_target_properties( ${LIBNAMED}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} PocoFoundationd )
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
add_subdirectory( SQLite )
if(MYSQL_FOUND)
add_subdirectory( MySQL )
endif(MYSQL_FOUND)
if(ODBC_CONFIG)
# add_subdirectory( ODBC )
endif(ODBC_CONFIG)
#add_subdirectory( testsuite )

36
Data/MySQL/CMakeLists.txt Normal file
View File

@ -0,0 +1,36 @@
set(LIBNAME "PocoMySQL")
set(LIBNAMED "${LIBNAME}d")
set(SRCS "")
aux_source_directory(src SRCS)
add_definitions(-DTHREADSAFE -DNO_TCL)
include_directories( include ${MYSQL_INCLUDE_DIR})
#link_directories( )
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
set_target_properties( ${LIBNAME}
PROPERTIES COMPILE_FLAGS ${DEBUG_CXX_FLAGS}
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${MYSQL_LIB})
add_library( ${LIBNAMED} ${LIB_MODE} ${SRCS} )
set_target_properties( ${LIBNAMED}
PROPERTIES COMPILE_FLAGS "${RELEASE_CXX_FLAGS}"
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} PocoDatad PocoFoundationd ${MYSQL_LIB})
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
#add_subdirectory( testsuite )

35
Data/ODBC/CMakeLists.txt Normal file
View File

@ -0,0 +1,35 @@
set(LIBNAME "PocoODBC")
set(LIBNAMED "${LIBNAME}d")
set(SRCS "")
aux_source_directory(src SRCS)
add_definitions( ${ODBC_CFLAGS} )
include_directories( include )
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
set_target_properties( ${LIBNAME}
PROPERTIES COMPILE_FLAGS ${DEBUG_CXX_FLAGS}
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${ODBC_LINK_FLAGS})
add_library( ${LIBNAMED} ${LIB_MODE} ${SRCS} )
set_target_properties( ${LIBNAMED}
PROPERTIES COMPILE_FLAGS "${RELEASE_CXX_FLAGS}"
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} PocoDatad PocoFoundationd ${ODBC_LINK_FLAGS})
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
#add_subdirectory( testsuite )

View File

@ -22,4 +22,14 @@ set_target_properties( ${LIBNAMED}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} PocoDatad )
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
#add_subdirectory( testsuite )

View File

@ -197,4 +197,15 @@ set_target_properties( ${LIBNAMED}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} dl rt)
install(
DIRECTORY include/Poco
DESTINATION include
FILES_MATCHING PATTERN "*.h"
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
#add_subdirectory( testsuite )

View File

@ -118,4 +118,14 @@ set_target_properties( ${LIBNAMED}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} )
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
#add_subdirectory( testsuite )

View File

@ -16,3 +16,13 @@ set_target_properties( ${LIBNAMED}
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} ssl crypto)
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)

View File

@ -54,4 +54,14 @@ set_target_properties( ${LIBNAMED}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} )
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
add_subdirectory( testsuite )

View File

@ -18,5 +18,16 @@ set_target_properties( ${LIBNAMED}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} PocoFoundationd )
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
add_subdirectory( ExtJS )
#add_subdirectory( testsuite )

View File

@ -22,4 +22,14 @@ set_target_properties( ${LIBNAMED}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} PocoDatad )
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
#add_subdirectory( testsuite )

View File

@ -18,14 +18,14 @@
// execute, and transmit the Software, and to prepare derivative works of the
// Software, and to permit third-parties to whom the Software is furnished to
// do so, all subject to the following:
//
//
// The copyright notices in the Software and this entire statement, including
// the above license grant, this restriction and the following disclaimer,
// must be included in all copies of the Software, in whole or in part, and
// all derivative works of the Software, unless such copies or derivative
// works are solely in the form of machine-executable object code generated by
// a source language processor.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
@ -68,7 +68,7 @@ public:
};
template <typename T>
template <typename T>
static void write(const T& t, std::ostream& out)
{
out << t;
@ -76,7 +76,7 @@ static void write(const T& t, std::ostream& out)
template <>
static void write(const std::string& t, std::ostream& out)
void write(const std::string& t, std::ostream& out)
{
out << "'" << Utility::safe(t) << "'";
}
@ -180,7 +180,7 @@ public:
_className(className)
{
}
void addFixed(const std::string& name, const std::string& fixedContent)
/// Adds a variable with a given fixed string content. The content will not be wrapped
@ -207,7 +207,7 @@ public:
{
const Class* pObj = reinterpret_cast<const Class*>(pAny);
ConstIterator it = _functions.begin();
//FIXME: only one dynamic column
//FIXME: only one dynamic column
if (it != _functions.end())
{
if (it != _functions.begin())
@ -314,7 +314,7 @@ public:
AbstractTableCellHandler(useEditor, useRenderer)
{
}
void addFixed(const std::string& name, const std::string& fixedContent)
/// Adds a variable with a given fixed string content. The content will not be wrapped
@ -334,7 +334,7 @@ public:
Image::Ptr ptrImg = _pClass->getImage();
bool hasImg = ptrImg && !ptrImg->getURI().empty();
bool showTxt = _pClass->getShowText() || !hasImg;
out << "function (val){return ";
out << "'<div>";
out << "<div>";
@ -394,7 +394,7 @@ public:
AbstractTableCellHandler(useEditor, useRenderer)
{
}
void addFixed(const std::string& name, const std::string& fixedContent)
/// Adds a variable with a given fixed string content. The content will not be wrapped

View File

@ -19,4 +19,14 @@ set_target_properties( ${LIBNAMED}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} )
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)
#add_subdirectory( testsuite )

View File

@ -16,3 +16,13 @@ set_target_properties( ${LIBNAMED}
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
target_link_libraries( ${LIBNAMED} )
install(
DIRECTORY include/Poco
DESTINATION include
)
install(
TARGETS ${LIBNAME} ${LIBNAMED}
DESTINATION lib
)