summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.txt9
-rw-r--r--CMakeLists.txt26
-rw-r--r--addon/doxysearch/CMakeLists.txt6
3 files changed, 28 insertions, 13 deletions
diff --git a/BUILD.txt b/BUILD.txt
index a507beb..3f9d421 100644
--- a/BUILD.txt
+++ b/BUILD.txt
@@ -1,7 +1,7 @@
Doxygen uses cmake (http://www.cmake.org/) to build executables for various platforms.
The first step is to create a build directory where the output should be stored.
-Doxygen directory can be fully build outside of the source tree.
+Doxygen can be fully build outside of the source tree.
The second step is to invoke cmake from within the build directory with the desired generator.
@@ -27,11 +27,12 @@ Doxygen's cmake configuration provides a number of options:
- build_wizard Build the GUI frontend for doxygen.
- build_app Example showing how to embed doxygen in an application.
- build_xmlparser Example showing how to parse doxygen's XML output.
-- build_search Build external search tools (doxysearch and doxyindexer)
-- build_doc Build user manual
+- build_search Build external search tools (doxysearch and doxyindexer).
+- build_doc Build user manual.
- use_sqlite3 Add support for sqlite3 output [experimental].
- use_libclang Add support for libclang parsing.
-- win_static Link with /MT in stead of /MD on windows
+- win_static Link with /MT in stead of /MD on windows.
+- english_only Only compile in support for the English language.
An option can be turned on, by adding -D<option>=ON as a command line option, this can be
done when generating the initial build files, but also afterwards, i.e. to enable building
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d203959..eba0fd7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,7 @@ endif()
find_package(Iconv REQUIRED)
include_directories(${ICONV_INCLUDE_DIR})
+
#set(DOXYDOCS ${CMAKE_SOURCE_DIR}/doc CACHE INTERNAL "Path to doxygen docs")
set(DOC_INSTALL_DIR "share/doc/packages/doxygen" CACHE STRING "Relative path where to install the documentation")
set(EXAMPLE_DIR ${CMAKE_SOURCE_DIR}/examples)
@@ -74,18 +75,25 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(CUSTOM_INCLUDE_DIR "" CACHE FILEPATH "Extra include path")
set(CUSTOM_LINK_DIR "" CACHE FILEPATH "Extra library path")
+# place binaries for all build types in the same directory, so we know where to find it
+# when running tests or generating docs
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${EXECUTABLE_OUTPUT_PATH})
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${EXECUTABLE_OUTPUT_PATH})
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${EXECUTABLE_OUTPUT_PATH})
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${EXECUTABLE_OUTPUT_PATH})
+
# gather lang codes for translation
+file(GLOB lang_files RELATIVE "${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src/translator_??.h")
+set(lcodes "")
+foreach (_lang ${lang_files})
+ string(REGEX REPLACE "translator_(.*).h" "\\1" _lang_code ${_lang})
+ string(TOUPPER ${_lang_code} lang_code)
+ list(APPEND lcodes "${lang_code}")
+endforeach()
if (english_only) # user only wants English
- set(LANG_CODES "ENONLY")
-else() # find languages based on available translator files
- set(LANG_CODES "")
- file(GLOB lang_files RELATIVE "${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src/translator_??.h")
- foreach (_lang ${lang_files})
- string(REGEX REPLACE "translator_(.*).h" "\\1" _lang_code ${_lang})
- string(TOUPPER ${_lang_code} lang_code)
- list(APPEND LANG_CODES "${lang_code}")
- endforeach()
+ set(lcodes "ENONLY")
endif()
+set(LANG_CODES ${lcodes} CACHE STRING "List of language codes for which translations should be compiled in")
if (${CUSTOM_INCLUDE_DIR})
include_directories(${CUSTOM_INCLUDE_DIR})
diff --git a/addon/doxysearch/CMakeLists.txt b/addon/doxysearch/CMakeLists.txt
index e3511aa..33e01c1 100644
--- a/addon/doxysearch/CMakeLists.txt
+++ b/addon/doxysearch/CMakeLists.txt
@@ -3,6 +3,10 @@ if (build_search)
find_package(Xapian REQUIRED)
find_package(ZLIB REQUIRED)
+if (WIN32)
+ set(WIN_EXTRA_LIBS "uuid.lib rpcrt4.lib ws2_32.lib")
+endif()
+
include_directories(
${CMAKE_SOURCE_DIR}/qtools
${XAPIAN_INCLUDE_DIR}
@@ -14,6 +18,7 @@ add_executable(doxyindexer
target_link_libraries(doxyindexer
${XAPIAN_LIBRARIES}
${ZLIB_LIBRARIES}
+ ${WIN_EXTRA_LIBS}
qtools
)
@@ -23,6 +28,7 @@ add_executable(doxysearch.cgi
target_link_libraries(doxysearch.cgi
${XAPIAN_LIBRARIES}
${ZLIB_LIBRARIES}
+ ${WIN_EXTRA_LIBS}
)
install(TARGETS doxyindexer doxysearch.cgi DESTINATION bin)