summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 09:02:03 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 09:02:03 +0000
commite0c10d684e412a71f9da9bafdde728c94ae9e8aa (patch)
tree54516efce454ea71c6c8f9c9b0d40fb66cffec69 /src/CMakeLists.txt
parent6a2c0a7785a3b60e57e796d7d148c25314fec9d3 (diff)
Reverting my last 2 commits in an attempt to fix my own screwball mistake.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1873 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt83
1 files changed, 0 insertions, 83 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
deleted file mode 100644
index 2d6518f5b..000000000
--- a/src/CMakeLists.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-# Find all the *.c and *.cpp files within the current source directory, and sort the list
-file(GLOB SRC_SRCS_C RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
-file(GLOB SRC_SRCS_CPP RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
-set(SRC_SRCS ${SRC_SRCS_C} ${SRC_SRCS_CPP})
-# If not using Visual Studio, don't include win32_memory.cpp, it's only required by Visual Studio to override it's override of the new/delete operators
-if(NOT MSVC)
- list(REMOVE_ITEM SRC_SRCS win32_memory.cpp)
-endif(NOT MSVC)
-# If not using Windows, don't include windows.cpp, as it's Windows-specific
-if(NOT WIN32)
- list(REMOVE_ITEM SRC_SRCS windows.cpp)
-endif(NOT WIN32)
-if(CMAKE244_OR_BETTER)
- list(SORT SRC_SRCS)
-endif(CMAKE244_OR_BETTER)
-
-# Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though)
-set_source_files_properties(${SRC_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
-
-# Iterate through all the source files
-foreach(SRC ${SRC_SRCS})
- # Calculate the header file dependencies for the given source file
- calculate_depends(${SRC})
-endforeach(SRC)
-
-# Under Windows, we also include a resource file to the build
-if(WIN32)
- # Make sure that the resource file is seen as an RC file to be compiled with a resource compiler, not a C++ compiler
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32.rc LANGUAGE RC)
- # Add the resource file to the list of sources
- append_to_list(SRC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/win32.rc)
- # For MinGW, we have to change the compile flags
- if(MINGW)
- set(RC_CFLAGS "-DMINGW -Ocoff -I${Anope_SOURCE_DIR}/include")
- # If any sort of debugging is being enabled, add a _DEBUG define to the flags for the resource compiler
- if(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
- set(RC_CFLAGS "${RC_CFLAGS} -D_DEBUG")
- endif(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32.rc COMPILE_FLAGS "${RC_CFLAGS}")
- # For anything else, assumingly Visual Studio at this point, use a different set of compile flags
- else(MINGW)
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32.rc COMPILE_FLAGS "/i\"${Anope_SOURCE_DIR}/include\"")
- endif(MINGW)
- if(IN_SOURCE)
- # Add the resource file to the list of files for CPack to ignore
- add_to_cpack_ignored_files("win32.rc$" TRUE)
- endif(IN_SOURCE)
-endif(WIN32)
-
-# 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})
-set_target_properties(${PROGRAM_NAME} PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}" ENABLE_EXPORTS ON)
-# On Windows, also link Anope to the wsock32 library, as well as set the version
-if(WIN32)
- target_link_libraries(${PROGRAM_NAME} wsock32)
- set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
-endif(WIN32)
-# Building the Anope executable requires the language files to be compiled first as well as the version.h header to be generated
-add_dependencies(${PROGRAM_NAME} language headers)
-
-# Get the filename of the Anope executable as it is in on this system
-get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
-get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
-set(SERVICES_BIN "${SERVICES_BINARY}")
-if(IN_SOURCE)
- # Add the Anope executable to the list of files for CPack to ignore
- add_to_cpack_ignored_files("${SERVICES_BINARY}$" TRUE)
-endif(IN_SOURCE)
-
-# Generate sysconf.h from the earlier configuration
-configure_file(${Anope_SOURCE_DIR}/include/sysconf.h.cmake ${Anope_BINARY_DIR}/include/sysconf.h)
-
-# Go into the following directories and run their CMakeLists.txt as well
-add_subdirectory(bin)
-add_subdirectory(core)
-add_subdirectory(modules)
-add_subdirectory(protocol)
-add_subdirectory(tools)
-
-# Set Anope to be installed to the bin directory
-install(TARGETS ${PROGRAM_NAME}
- DESTINATION .
-)