Skip to content

Commit 60e1433

Browse files
author
Marian Krivos
committed
rest of cmake scripts for samples + apache/apr detection
1 parent 24e706a commit 60e1433

25 files changed

Lines changed: 251 additions & 4 deletions

File tree

‎ApacheConnector/CMakeLists.txt‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
set(LIBNAME "mod_poco")
22
set(LIBNAMED "${LIBNAME}d")
33

4-
include_directories( include /usr/include/apache2 /usr/include/apr-0 /usr/include/apr-1 )
4+
include_directories( include ${APACHE_INCLUDE_DIR} ${APRUTIL_INCLUDE_DIR} )
55

66
aux_source_directory(src SRCS)
77

8-
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
8+
add_library( ${LIBNAME} SHARED ${SRCS} )
99
set_target_properties( ${LIBNAME}
1010
PROPERTIES COMPILE_FLAGS ${DEBUG_CXX_FLAGS}
1111
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
1212
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
1313
target_link_libraries( ${LIBNAME} )
1414

15-
add_library( ${LIBNAMED} ${LIB_MODE} ${SRCS} )
15+
add_library( ${LIBNAMED} SHARED ${SRCS} )
1616
set_target_properties( ${LIBNAMED}
1717
PROPERTIES COMPILE_FLAGS "${RELEASE_CXX_FLAGS}"
1818
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
1919
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
2020
target_link_libraries( ${LIBNAMED} )
21+
22+
add_subdirectory(samples)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
add_subdirectory( FormServer )
2+
add_subdirectory( TimeServer )
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set(SAMPLE_NAME "FormServer")
2+
3+
set(LOCAL_SRCS "")
4+
aux_source_directory(src LOCAL_SRCS)
5+
6+
add_library( ${SAMPLE_NAME} SHARED ${LOCAL_SRCS} )
7+
set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
8+
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoFoundation )
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set(SAMPLE_NAME "TimeServer-apache")
2+
3+
set(LOCAL_SRCS "")
4+
aux_source_directory(src LOCAL_SRCS)
5+
6+
add_library( ${SAMPLE_NAME} SHARED ${LOCAL_SRCS} )
7+
set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
8+
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoFoundation )

‎CMakeLists.txt‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ include(FindOpenSSL)
2424

2525
include(contrib/cmake/FindMySQL.cmake)
2626
include(contrib/cmake/FindODBC.cmake)
27+
include(contrib/cmake/FindAPR.cmake)
28+
include(contrib/cmake/FindApache2.cmake)
2729

2830
# OS Detection
2931
if(CMAKE_SYSTEM MATCHES "Windows")
@@ -49,4 +51,7 @@ endif(OPENSSL_FOUND)
4951
add_subdirectory(Data)
5052
add_subdirectory(WebWidgets)
5153
add_subdirectory(Zip)
52-
#add_subdirectory(ApacheConnector)
54+
55+
if(APRUTIL_FOUND AND APACHE_FOUND)
56+
add_subdirectory(ApacheConnector)
57+
endif(APRUTIL_FOUND AND APACHE_FOUND)

‎NetSSL_OpenSSL/CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ install(
2626
TARGETS ${LIBNAME} ${LIBNAMED}
2727
DESTINATION lib
2828
)
29+
30+
add_subdirectory( samples )
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
add_subdirectory( HTTPSTimeServer )
2+
add_subdirectory( download )
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set(SAMPLE_NAME "HTTPSTimeServer")
2+
3+
set(LOCAL_SRCS "")
4+
aux_source_directory(src LOCAL_SRCS)
5+
6+
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
7+
set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
8+
target_link_libraries( ${SAMPLE_NAME} PocoNetSSL PocoUtil PocoNet PocoXML PocoFoundation )
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set(SAMPLE_NAME "download-ssl")
2+
3+
set(LOCAL_SRCS "")
4+
aux_source_directory(src LOCAL_SRCS)
5+
6+
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
7+
set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
8+
target_link_libraries( ${SAMPLE_NAME} PocoNetSSL PocoUtil PocoNet PocoXML PocoFoundation )

‎WebWidgets/ExtJS/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ install(
3232
DESTINATION lib
3333
)
3434

35+
add_subdirectory( samples )
3536
#add_subdirectory( testsuite )

0 commit comments

Comments
 (0)