diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 28 | ||||
-rw-r--r-- | src/tools/CMakeLists.txt | 6 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b32c1d9c0..ba2eff6c9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,21 +8,21 @@ if(WIN32) list(APPEND SRC_SRCS win32/dl/dl.cpp) list(APPEND SRC_SRCS win32/pipe/pipe.cpp) list(APPEND SRC_SRCS win32/sigaction/sigaction.cpp) -endif(WIN32) +endif() if(HAVE_EPOLL) list(APPEND SRC_SRCS socketengines/socketengine_epoll.cpp) -else(HAVE_EPOLL) +else() if(HAVE_KQUEUE) list(APPEND SRC_SRCS socketengines/socketengine_kqueue.cpp) - else(HAVE_KQUEUE) + else() if(HAVE_POLL) list(APPEND SRC_SRCS socketengines/socketengine_poll.cpp) - else(HAVE_POLL) + else() list(APPEND SRC_SRCS socketengines/socketengine_select.cpp) - endif(HAVE_POLL) - endif(HAVE_KQUEUE) -endif(HAVE_EPOLL) + endif() + endif() +endif() list(SORT SRC_SRCS) @@ -36,7 +36,7 @@ if(WIN32) # Add the resource file to the list of sources list(APPEND SRC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc) set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc COMPILE_FLAGS "/i\"${Anope_SOURCE_DIR}/include\"") -endif(WIN32) +endif() # If compiling with Visual Studio, create a static library out of win32/win32_memory.cpp to be included with everything else, needed to override its override of new/delete operators if(MSVC) @@ -44,9 +44,9 @@ if(MSVC) add_library(win32_memory STATIC win32/win32_memory.cpp) set(WIN32_MEMORY win32_memory) set(EXTRA_LDFLAGS "/OPT:NOREF") # https://sourceware.org/bugzilla/show_bug.cgi?id=12633 -else(MSVC) +else() set(WIN32_MEMORY) -endif(MSVC) +endif() # Generate the Anope executable and set it's linker flags, also set it to export it's symbols even though it's not a module add_executable(${PROGRAM_NAME} ${SRC_SRCS}) @@ -55,15 +55,15 @@ set_target_properties(${PROGRAM_NAME} PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS if(WIN32) target_link_libraries(${PROGRAM_NAME} wsock32 Ws2_32 ${LINK_LIBS} ${GETTEXT_LIBRARIES} ${WIN32_MEMORY}) set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") -else(WIN32) +else() target_link_libraries(${PROGRAM_NAME} ${LINK_LIBS} ${GETTEXT_LIBRARIES}) -endif(WIN32) +endif() # Building the Anope executable requires the version.h header to be generated add_dependencies(${PROGRAM_NAME} headers) # Also require the language files if we have gettext if(GETTEXT_FOUND) add_dependencies(${PROGRAM_NAME} language) -endif(GETTEXT_FOUND) +endif() # Get the filename of the Anope executable as it is in on this system get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION) @@ -77,7 +77,7 @@ configure_file(${Anope_SOURCE_DIR}/include/sysconf.h.cmake ${Anope_BINARY_DIR}/i # Go into the following directories and run their CMakeLists.txt as well if(NOT DISABLE_TOOLS) add_subdirectory(tools) -endif(NOT DISABLE_TOOLS) +endif() # Set Anope to be installed to the bin directory install(TARGETS ${PROGRAM_NAME} diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index d970d93b0..4d64f6fd9 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -21,7 +21,7 @@ foreach(SRC ${TOOLS_SRCS}) get_target_property(EXE_BINARY ${EXE} LOCATION) get_filename_component(EXE_BINARY ${EXE_BINARY} NAME) add_to_cpack_ignored_files("${EXE_BINARY}$" TRUE) -endforeach(SRC) +endforeach() # If not on Windows, generate anoperc and install it along with mydbgen if(NOT WIN32) @@ -32,9 +32,9 @@ if(NOT WIN32) install (PROGRAMS geoipupdate.sh DESTINATION ${BIN_DIR} ) -endif(NOT WIN32) +endif() # On non-Windows platforms, if RUNGROUP is set, change the permissions of the tools directory if(NOT WIN32 AND RUNGROUP) install(CODE "execute_process(COMMAND ${CHMOD} 2770 \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin\")") -endif(NOT WIN32 AND RUNGROUP) +endif() |