summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/char/CMakeLists.txt7
-rw-r--r--src/char_sql/CMakeLists.txt7
-rw-r--r--src/common/CMakeLists.txt4
-rw-r--r--src/login/sql/CMakeLists.txt7
-rw-r--r--src/login/txt/CMakeLists.txt7
-rw-r--r--src/map/sql/CMakeLists.txt7
-rw-r--r--src/map/txt/CMakeLists.txt7
-rw-r--r--src/plugins/CMakeLists.txt175
-rw-r--r--src/tool/CMakeLists.txt6
-rw-r--r--src/txt-converter/CMakeLists.txt3
-rw-r--r--src/txt-converter/char/CMakeLists.txt13
-rw-r--r--src/txt-converter/login/CMakeLists.txt13
13 files changed, 203 insertions, 55 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9415fc82c..4233bcb12 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,4 +6,4 @@ add_subdirectory( char_sql )
add_subdirectory( map )
add_subdirectory( tool )
add_subdirectory( txt-converter )
-#add_subdirectory( plugins )
+add_subdirectory( plugins )
diff --git a/src/char/CMakeLists.txt b/src/char/CMakeLists.txt
index 29bfeb6fe..92c9f2934 100644
--- a/src/char/CMakeLists.txt
+++ b/src/char/CMakeLists.txt
@@ -42,17 +42,14 @@ add_executable( char-server ${SOURCE_FILES} )
add_dependencies( char-server ${DEPENDENCIES} )
target_link_libraries( char-server ${LIBRARIES} ${DEPENDENCIES} )
set_target_properties( char-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( WITH_COMPONENT_RUNTIME )
+if( INSTALL_COMPONENT_RUNTIME )
cpack_add_component( Runtime_charserver_txt DESCRIPTION "char-server (txt version)" DISPLAY_NAME "char-server" GROUP Runtime )
install( TARGETS char-server
DESTINATION "."
COMPONENT Runtime_charserver_txt )
-endif()
-set( HAVE_char-server ON CACHE BOOL "char-server target is available" )
-mark_as_advanced( HAVE_char-server )
+endif( INSTALL_COMPONENT_RUNTIME )
set( TARGET_LIST ${TARGET_LIST} char-server CACHE INTERNAL "" )
message( STATUS "Creating target char-server - done" )
else()
message( STATUS "Skipping target char-server (requires common_base)" )
-unset( HAVE_char-server CACHE )
endif()
diff --git a/src/char_sql/CMakeLists.txt b/src/char_sql/CMakeLists.txt
index 12c5b078f..cbdee1669 100644
--- a/src/char_sql/CMakeLists.txt
+++ b/src/char_sql/CMakeLists.txt
@@ -48,17 +48,14 @@ add_executable( char-server_sql ${SOURCE_FILES} )
add_dependencies( char-server_sql ${DEPENDENCIES} )
target_link_libraries( char-server_sql ${LIBRARIES} ${DEPENDENCIES} )
set_target_properties( char-server_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( WITH_COMPONENT_RUNTIME )
+if( INSTALL_COMPONENT_RUNTIME )
cpack_add_component( Runtime_charserver_sql DESCRIPTION "char-server (sql version)" DISPLAY_NAME "char-server_sql" GROUP Runtime )
install( TARGETS char-server_sql
DESTINATION "."
COMPONENT Runtime_charserver_sql )
-endif()
+endif( INSTALL_COMPONENT_RUNTIME )
set( HAVE_char-server_sql ON CACHE BOOL "char-server_sql target is available" )
-mark_as_advanced( HAVE_char-server_sql )
-set( TARGET_LIST ${TARGET_LIST} char-server_sql CACHE INTERNAL "" )
message( STATUS "Creating target char-server_sql - done" )
else()
message( STATUS "Skipping target char-server_sql (requires common_sql)" )
-unset( HAVE_char-server_sql CACHE )
endif()
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 3fb95e5e0..6f117c6d5 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -12,11 +12,11 @@ endif()
set( GLOBAL_INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "" )
set( SVNVERSION ${SVNVERSION}
CACHE STRING "SVN version of the source code" )
-if( WITH_COMPONENT_DEVELOPMENT )
+if( INSTALL_COMPONENT_DEVELOPMENT )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
DESTINATION "src/common"
COMPONENT Development_base )
-endif()
+endif( INSTALL_COMPONENT_DEVELOPMENT )
message( STATUS "Creating svnversion.h - done" )
diff --git a/src/login/sql/CMakeLists.txt b/src/login/sql/CMakeLists.txt
index 85ad44e94..153d9562f 100644
--- a/src/login/sql/CMakeLists.txt
+++ b/src/login/sql/CMakeLists.txt
@@ -28,17 +28,14 @@ add_executable( login-server_sql ${SOURCE_FILES} )
add_dependencies( login-server_sql ${DEPENDENCIES} )
target_link_libraries( login-server_sql ${LIBRARIES} ${DEPENDENCIES} )
set_target_properties( login-server_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( WITH_COMPONENT_RUNTIME )
+if( INSTALL_COMPONENT_RUNTIME )
cpack_add_component( Runtime_loginserver_sql DESCRIPTION "login-server (sql version)" DISPLAY_NAME "login-server_sql" GROUP Runtime )
install( TARGETS login-server_sql
DESTINATION "."
COMPONENT Runtime_loginserver_sql )
-endif()
-set( HAVE_login-server_sql ON CACHE BOOL "login-server_sql target is available" )
-mark_as_advanced( HAVE_login-server_sql )
+endif( INSTALL_COMPONENT_RUNTIME )
set( TARGET_LIST ${TARGET_LIST} login-server_sql CACHE INTERNAL "" )
message( STATUS "Creating target login-server_sql - done" )
else()
message( STATUS "Skipping target login-server_sql (requires common_sql)" )
-unset( HAVE_login-server_sql CACHE )
endif()
diff --git a/src/login/txt/CMakeLists.txt b/src/login/txt/CMakeLists.txt
index a8d1246b7..75e055903 100644
--- a/src/login/txt/CMakeLists.txt
+++ b/src/login/txt/CMakeLists.txt
@@ -28,17 +28,14 @@ add_executable( login-server ${SOURCE_FILES} )
add_dependencies( login-server ${DEPENDENCIES} )
target_link_libraries( login-server ${LIBRARIES} ${DEPENDENCIES} )
set_target_properties( login-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( WITH_COMPONENT_RUNTIME )
+if( INSTALL_COMPONENT_RUNTIME )
cpack_add_component( Runtime_loginserver_txt DESCRIPTION "login-server (txt version)" DISPLAY_NAME "login-server" GROUP Runtime )
install( TARGETS login-server
DESTINATION "."
COMPONENT Runtime_loginserver_txt )
-endif()
-set( HAVE_login-server ON CACHE BOOL "login-server target is available" )
-mark_as_advanced( HAVE_login-server )
+endif( INSTALL_COMPONENT_RUNTIME )
set( TARGET_LIST ${TARGET_LIST} login-server CACHE INTERNAL "" )
message( STATUS "Creating target login-server - done" )
else()
message( STATUS "Skipping target login-server (requires common_base)" )
-unset( HAVE_login-server CACHE )
endif()
diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt
index 591e3e65b..68a8b750a 100644
--- a/src/map/sql/CMakeLists.txt
+++ b/src/map/sql/CMakeLists.txt
@@ -95,17 +95,14 @@ add_executable( map-server_sql ${SOURCE_FILES} )
add_dependencies( map-server_sql ${DEPENDENCIES} )
target_link_libraries( map-server_sql ${LIBRARIES} ${DEPENDENCIES} )
set_target_properties( map-server_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( WITH_COMPONENT_RUNTIME )
+if( INSTALL_COMPONENT_RUNTIME )
cpack_add_component( Runtime_mapserver_sql DESCRIPTION "map-server (sql version)" DISPLAY_NAME "map-server_sql" GROUP Runtime )
install( TARGETS map-server_sql
DESTINATION "."
COMPONENT Runtime_mapserver_sql )
-endif()
-set( HAVE_map-server_sql ON CACHE BOOL "map-server_sql target is available" )
-mark_as_advanced( HAVE_map-server_sql )
+endif( INSTALL_COMPONENT_RUNTIME )
set( TARGET_LIST ${TARGET_LIST} map-server_sql CACHE INTERNAL "" )
message( STATUS "Creating target map-server_sql - done" )
else()
message( STATUS "Skipping target map-server_sql (requires common_sql; optional PCRE)" )
-unset( HAVE_map-server_sql CACHE )
endif()
diff --git a/src/map/txt/CMakeLists.txt b/src/map/txt/CMakeLists.txt
index 878ab68d2..409013e77 100644
--- a/src/map/txt/CMakeLists.txt
+++ b/src/map/txt/CMakeLists.txt
@@ -95,17 +95,14 @@ add_executable( map-server ${SOURCE_FILES} )
add_dependencies( map-server ${DEPENDENCIES} )
target_link_libraries( map-server ${LIBRARIES} ${DEPENDENCIES} )
set_target_properties( map-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( WITH_COMPONENT_RUNTIME )
+if( INSTALL_COMPONENT_RUNTIME )
cpack_add_component( Runtime_mapserver_txt DESCRIPTION "map-server (txt version)" DISPLAY_NAME "map-server" GROUP Runtime )
install( TARGETS map-server
DESTINATION "."
COMPONENT Runtime_mapserver_txt )
-endif()
-set( HAVE_map-server ON CACHE BOOL "map-server target is available" )
-mark_as_advanced( HAVE_map-server )
+endif( INSTALL_COMPONENT_RUNTIME )
set( TARGET_LIST ${TARGET_LIST} map-server CACHE INTERNAL "" )
message( STATUS "Creating target map-server - done" )
else()
message( STATUS "Skipping target map-server (requires common_base; optional PCRE)" )
-unset( HAVE_map-server CACHE )
endif()
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
new file mode 100644
index 000000000..220f70f6b
--- /dev/null
+++ b/src/plugins/CMakeLists.txt
@@ -0,0 +1,175 @@
+
+#
+# setup
+#
+get_property( CAN_BUILD_SHARED_LIBS GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS )
+if( NOT CAN_BUILD_SHARED_LIBS )
+ return()
+endif()
+
+#
+# console
+#
+option( BUILD_PLUGIN_console "build console plugin" OFF )
+if( BUILD_PLUGIN_console )
+message( STATUS "Creating target console" )
+set( CONSOLE_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/console.c"
+ "${CMAKE_CURRENT_SOURCE_DIR}/console.def"
+ )
+set( LIBRARIES ${GLOBAL_LIBRARIES} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
+set( DEFINITIONS ${GLOBAL_DEFINITIONS} )
+set( SOURCE_FILES ${CONSOLE_SOURCES} )
+source_group( console FILES ${CONSOLE_SOURCES} )
+include_directories( ${INCLUDE_DIRS} )
+add_library( console SHARED ${SOURCE_FILES} )
+target_link_libraries( console ${LIBRARIES} )
+set_target_properties( console PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
+set_target_properties( console PROPERTIES PREFIX "" )
+if( INSTALL_COMPONENT_RUNTIME )
+ cpack_add_component( Runtime_console DESCRIPTION "console plugin" DISPLAY_NAME "console" GROUP Runtime )
+ install( TARGETS console
+ DESTINATION "plugins"
+ COMPONENT Runtime_console )
+endif( INSTALL_COMPONENT_RUNTIME )
+set( TARGET_LIST ${TARGET_LIST} console CACHE INTERNAL "" )
+message( STATUS "Creating target console - done" )
+endif( BUILD_PLUGIN_console )
+
+
+#
+# dbghelpplug
+#
+if( WIN32 )
+ find_path( HAVE_DBGHELP_H dbghelp.h )
+ mark_as_advanced( HAVE_DBGHELP_H )
+ if( HAVE_DBGHELP_H )
+ option( BUILD_PLUGIN_dbghelpplug "build dbghelpplug plugin" OFF )
+ endif()
+endif()
+if( BUILD_PLUGIN_dbghelpplug )
+message( STATUS "Creating target dbghelpplug" )
+set( DBGHELPPLUG_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/dbghelpplug.c"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dbghelpplug.rc"
+ )
+set( LIBRARIES ${GLOBAL_LIBRARIES} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
+set( DEFINITIONS ${GLOBAL_DEFINITIONS} )
+set( SOURCE_FILES ${DBGHELPPLUG_SOURCES} )
+source_group( dbghelpplug FILES ${DBGHELPPLUG_SOURCES} )
+include_directories( ${INCLUDE_DIRS} )
+add_library( dbghelpplug SHARED ${SOURCE_FILES} )
+target_link_libraries( dbghelpplug ${LIBRARIES} )
+set_target_properties( dbghelpplug PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
+set_target_properties( dbghelpplug PROPERTIES PREFIX "" )
+if( INSTALL_COMPONENT_RUNTIME )
+ cpack_add_component( Runtime_dbghelpplug DESCRIPTION "dbghelpplug plugin" DISPLAY_NAME "dbghelpplug" GROUP Runtime )
+ install( TARGETS dbghelpplug
+ DESTINATION "plugins"
+ COMPONENT Runtime_dbghelpplug )
+endif( INSTALL_COMPONENT_RUNTIME )
+set( TARGET_LIST ${TARGET_LIST} dbghelpplug CACHE INTERNAL "" )
+message( STATUS "Creating target dbghelpplug - done" )
+endif( BUILD_PLUGIN_dbghelpplug )
+
+
+#
+# pid
+#
+if( WIN32 OR HAVE_GETPID )
+ option( BUILD_PLUGIN_pid "build pid plugin" OFF )
+endif()
+if( BUILD_PLUGIN_pid )
+message( STATUS "Creating target pid" )
+set( PID_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/pid.c"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pid.def"
+ )
+set( LIBRARIES ${GLOBAL_LIBRARIES} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
+set( DEFINITIONS ${GLOBAL_DEFINITIONS} )
+set( SOURCE_FILES ${PID_SOURCES} )
+source_group( pid FILES ${PID_SOURCES} )
+include_directories( ${INCLUDE_DIRS} )
+add_library( pid SHARED ${SOURCE_FILES} )
+target_link_libraries( pid ${LIBRARIES} )
+set_target_properties( pid PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
+set_target_properties( pid PROPERTIES PREFIX "" )
+if( INSTALL_COMPONENT_RUNTIME )
+ cpack_add_component( Runtime_pid DESCRIPTION "pid plugin" DISPLAY_NAME "pid" GROUP Runtime )
+ install( TARGETS pid
+ DESTINATION "plugins"
+ COMPONENT Runtime_pid )
+endif( INSTALL_COMPONENT_RUNTIME )
+set( TARGET_LIST ${TARGET_LIST} pid CACHE INTERNAL "" )
+message( STATUS "Creating target pid - done" )
+endif( BUILD_PLUGIN_pid )
+
+
+#
+# sample
+#
+option( BUILD_PLUGIN_sample "build sample plugin" OFF )
+if( BUILD_PLUGIN_sample )
+message( STATUS "Creating target sample" )
+set( SAMPLE_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/sample.c"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sample.def"
+ )
+set( LIBRARIES ${GLOBAL_LIBRARIES} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
+set( DEFINITIONS ${GLOBAL_DEFINITIONS} )
+set( SOURCE_FILES ${SAMPLE_SOURCES} )
+source_group( sample FILES ${SAMPLE_SOURCES} )
+include_directories( ${INCLUDE_DIRS} )
+add_library( sample SHARED ${SOURCE_FILES} )
+target_link_libraries( sample ${LIBRARIES} )
+set_target_properties( sample PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
+set_target_properties( sample PROPERTIES PREFIX "" )
+if( INSTALL_COMPONENT_RUNTIME )
+ cpack_add_component( Runtime_sample DESCRIPTION "sample plugin" DISPLAY_NAME "sample" GROUP Runtime )
+ install( TARGETS sample
+ DESTINATION "plugins"
+ COMPONENT Runtime_sample )
+endif( INSTALL_COMPONENT_RUNTIME )
+set( TARGET_LIST ${TARGET_LIST} sample CACHE INTERNAL "" )
+message( STATUS "Creating target sample - done" )
+endif( BUILD_PLUGIN_sample )
+
+
+#
+# sig
+#
+option( BUILD_PLUGIN_sig "build sig plugin" OFF )
+if( BUILD_PLUGIN_sig )
+message( STATUS "Creating target sig" )
+set( SIG_SOURCES
+ "${COMMON_SOURCE_DIR}/malloc.c"
+ "${COMMON_SOURCE_DIR}/malloc.h"
+ "${COMMON_SOURCE_DIR}/showmsg.c"
+ "${COMMON_SOURCE_DIR}/showmsg.h"
+ "${COMMON_SOURCE_DIR}/strlib.c"
+ "${COMMON_SOURCE_DIR}/strlib.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/sig.c"
+ )
+set( LIBRARIES ${GLOBAL_LIBRARIES} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
+set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_MINI_DEFINITIONS} -DNO_MEMMGR" )
+set( SOURCE_FILES ${SIG_SOURCES} )
+source_group( sig FILES ${SIG_SOURCES} )
+include_directories( ${INCLUDE_DIRS} )
+add_library( sig SHARED ${SOURCE_FILES} )
+target_link_libraries( sig ${LIBRARIES} )
+set_target_properties( sig PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
+set_target_properties( sig PROPERTIES PREFIX "" )
+if( INSTALL_COMPONENT_RUNTIME )
+ cpack_add_component( Runtime_sig DESCRIPTION "sig plugin" DISPLAY_NAME "sig" GROUP Runtime )
+ install( TARGETS sig
+ DESTINATION "plugins"
+ COMPONENT Runtime_sig )
+endif( INSTALL_COMPONENT_RUNTIME )
+set( TARGET_LIST ${TARGET_LIST} sig CACHE INTERNAL "" )
+message( STATUS "Creating target sig - done" )
+endif( BUILD_PLUGIN_sig )
diff --git a/src/tool/CMakeLists.txt b/src/tool/CMakeLists.txt
index 26595b404..4dc500fc7 100644
--- a/src/tool/CMakeLists.txt
+++ b/src/tool/CMakeLists.txt
@@ -27,14 +27,12 @@ add_executable( mapcache ${SOURCE_FILES} )
include_directories( ${INCLUDE_DIRS} )
target_link_libraries( mapcache ${LIBRARIES} )
set_target_properties( mapcache PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( WITH_COMPONENT_RUNTIME )
+if( INSTALL_COMPONENT_RUNTIME )
cpack_add_component( Runtime_mapcache DESCRIPTION "mapcache generator" DISPLAY_NAME "mapcache" GROUP Runtime )
install( TARGETS mapcache
DESTINATION "."
COMPONENT Runtime_mapcache )
-endif()
-set( HAVE_mapcache ON CACHE BOOL "mapcache target is available" )
-mark_as_advanced( HAVE_mapcache )
+endif( INSTALL_COMPONENT_RUNTIME )
set( TARGET_LIST ${TARGET_LIST} mapcache CACHE INTERNAL "" )
message( STATUS "Creating target mapcache - done" )
else()
diff --git a/src/txt-converter/CMakeLists.txt b/src/txt-converter/CMakeLists.txt
index bd7d6f1b7..94376c42f 100644
--- a/src/txt-converter/CMakeLists.txt
+++ b/src/txt-converter/CMakeLists.txt
@@ -3,6 +3,9 @@
# setup
#
set( CONVERTER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
+if( WITH_MYSQL )
+ option( BUILD_CONVERTERS "build login-converter and char-converter" OFF )
+endif()
#
diff --git a/src/txt-converter/char/CMakeLists.txt b/src/txt-converter/char/CMakeLists.txt
index ecdc28091..ad3970d77 100644
--- a/src/txt-converter/char/CMakeLists.txt
+++ b/src/txt-converter/char/CMakeLists.txt
@@ -2,7 +2,7 @@
#
# char-converter
#
-if( WITH_MYSQL )
+if( BUILD_CONVERTERS )
message( STATUS "Creating target char-converter" )
set( COMMON_HEADERS
${COMMON_MINI_HEADERS}
@@ -65,17 +65,12 @@ include_directories( ${INCLUDE_DIRS} )
add_executable( char-converter ${SOURCE_FILES} )
target_link_libraries( char-converter ${LIBRARIES} )
set_target_properties( char-converter PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( WITH_COMPONENT_RUNTIME )
+if( INSTALL_COMPONENT_RUNTIME )
cpack_add_component( Runtime_charconverter DESCRIPTION "char-converter" DISPLAY_NAME "char-converter" GROUP Runtime )
install( TARGETS char-converter
DESTINATION "tools"
COMPONENT Runtime_charconverter )
-endif()
-set( HAVE_char-converter ON CACHE BOOL "char-converter target is available" )
-mark_as_advanced( HAVE_char-converter )
+endif( INSTALL_COMPONENT_RUNTIME )
set( TARGET_LIST ${TARGET_LIST} char-converter CACHE INTERNAL "" )
message( STATUS "Creating target char-converter - done" )
-else()
-message( STATUS "Skipping target char-converter (requires MYSQL)" )
-unset( HAVE_char-converter CACHE )
-endif()
+endif( BUILD_CONVERTERS )
diff --git a/src/txt-converter/login/CMakeLists.txt b/src/txt-converter/login/CMakeLists.txt
index 8cf333438..605050d60 100644
--- a/src/txt-converter/login/CMakeLists.txt
+++ b/src/txt-converter/login/CMakeLists.txt
@@ -2,7 +2,7 @@
#
# login-converter
#
-if( WITH_MYSQL )
+if( BUILD_CONVERTERS )
message( STATUS "Creating target login-converter" )
set( COMMON_HEADERS
${COMMON_MINI_HEADERS}
@@ -49,17 +49,12 @@ include_directories( ${INCLUDE_DIRS} )
add_executable( login-converter ${SOURCE_FILES} )
target_link_libraries( login-converter ${LIBRARIES} )
set_target_properties( login-converter PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
-if( WITH_COMPONENT_RUNTIME )
+if( INSTALL_COMPONENT_RUNTIME )
cpack_add_component( Runtime_loginconverter DESCRIPTION "login-converter" DISPLAY_NAME "login-converter" GROUP Runtime )
install( TARGETS login-converter
DESTINATION "tools"
COMPONENT Runtime_loginconverter )
-endif()
-set( HAVE_login-converter ON CACHE BOOL "login-converter target is available" )
-mark_as_advanced( HAVE_login-converter )
+endif( INSTALL_COMPONENT_RUNTIME )
set( TARGET_LIST ${TARGET_LIST} login-converter CACHE INTERNAL "" )
message( STATUS "Creating target login-converter - done" )
-else()
-message( STATUS "Skipping target login-converter (requires MYSQL)" )
-unset( HAVE_login-converter CACHE )
-endif()
+endif( BUILD_CONVERTERS )