2013-08-29 00:21:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
file(GLOB AUDIO_FILES Audio/*.cpp Audio/*.h)
|
|
|
|
file(GLOB AUDIO_AL_FILES Audio/AL/*.cpp Audio/AL/*.h)
|
|
|
|
set(BINPACK_FILES binpack2d/binpack2d.hpp)
|
|
|
|
file(GLOB CLIENT_FILES Client/*.cpp Client/*.h)
|
|
|
|
file(GLOB CORE_FILES Core/*.cpp Core/*.h)
|
|
|
|
file(GLOB DRAW_FILES Draw/*.cpp Draw/*.h)
|
2013-08-31 02:23:30 +02:00
|
|
|
file(GLOB ENET_FILES ENet/*.c ENet/*.h)
|
2013-08-31 18:06:46 +02:00
|
|
|
file(GLOB ENET_INCLUDE ENet/include/enet/*.h)
|
|
|
|
file(GLOB CURL_FILES curl/*.c curl/*.h)
|
|
|
|
file(GLOB CURL_INCLUDE curl/include/curl/*.h)
|
2013-08-29 00:21:27 +02:00
|
|
|
file(GLOB GUI_FILES Gui/*.cpp Gui/*.h)
|
|
|
|
file(GLOB IMPORTS_FILES Imports/*.h)
|
|
|
|
file(GLOB KISS_FILES kiss_fft130/*.c kiss_fft130/*.h)
|
2013-08-31 18:06:46 +02:00
|
|
|
file(GLOB JSON_FILES json/*.cpp json/*.h json/*.inl)
|
|
|
|
file(GLOB JSON_INCLUDE json/include/json/*.h)
|
2013-08-29 00:21:27 +02:00
|
|
|
file(GLOB POLY2TRI_FILES poly2tri/*.cc poly2tri/*.h)
|
|
|
|
file(GLOB POLY2TRI_COMMON_FILES poly2tri/common/*.cc poly2tri/common/*.h)
|
|
|
|
file(GLOB POLY2TRI_SWEEP_FILES poly2tri/sweep/*.cc poly2tri/sweep/*.h)
|
|
|
|
file(GLOB UNZIP_FILES unzip/*.c unzip/*.h)
|
|
|
|
|
2013-08-31 18:06:46 +02:00
|
|
|
include_directories(".")
|
|
|
|
include_directories("json/include")
|
2013-08-31 02:03:24 +02:00
|
|
|
include_directories("ENet/include")
|
2013-08-31 18:06:46 +02:00
|
|
|
include_directories("curl/include")
|
2013-08-29 00:21:27 +02:00
|
|
|
|
2013-08-31 18:06:46 +02:00
|
|
|
add_definitions(-DBUILDING_LIBCURL)
|
|
|
|
add_definitions(-DCURL_DISABLE_LDAP=1)
|
|
|
|
add_definitions(-DCURL_DISABLE_LDAPS=1)
|
|
|
|
add_definitions(-DCURL_DISABLE_TELNET=1)
|
|
|
|
add_definitions(-DCURL_DISABLE_FTP=1)
|
|
|
|
add_definitions(-DCURL_DISABLE_TFTP=1)
|
|
|
|
|
|
|
|
|
|
|
|
add_executable(OpenSpades ${AUDIO_FILES} ${AUDIO_AL_FILES} ${BINPACK_FILES} ${CLIENT_FILES} ${CORE_FILES} ${DRAW_FILES} ${ENET_FILES} ${ENET_INCLUDE} ${CURL_FILES} ${CURL_INCLUDE} ${GUI_FILES}
|
|
|
|
${IMPORTS_FILES} ${KISS_FILES} ${JSON_FILES} ${JSON_INCLUDE} ${POLY2TRI_COMMON_FILES} ${POLY2TRI_SWEEP_FILES} ${UNZIP_FILES})
|
2013-08-29 00:21:27 +02:00
|
|
|
set_target_properties(OpenSpades PROPERTIES LINKER_LANGUAGE CXX)
|
2013-08-30 23:58:56 +02:00
|
|
|
set_target_properties(OpenSpades PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
set_target_properties(OpenSpades PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
set_target_properties(OpenSpades PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
string(REGEX REPLACE "\\.lib$" ".dll" SDL_DLL ${SDL_LIBRARY})
|
|
|
|
add_custom_command(TARGET OpenSpades POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SDL_DLL}" "${CMAKE_BINARY_DIR}/bin/\$\(Configuration\)/")
|
|
|
|
endif()
|
|
|
|
|
2013-08-29 00:21:27 +02:00
|
|
|
source_group("Audio" FILES ${AUDIO_FILES})
|
|
|
|
source_group("Audio\\AL" FILES ${AUDIO_AL_FILES})
|
|
|
|
source_group("binpack2d" FILES ${BINPACK_FILES})
|
|
|
|
source_group("Client" FILES ${CLIENT_FILES})
|
|
|
|
source_group("Core" FILES ${CORE_FILES})
|
|
|
|
source_group("Draw" FILES ${DRAW_FILES})
|
|
|
|
source_group("Enet" FILES ${ENET_FILES})
|
2013-08-31 18:06:46 +02:00
|
|
|
source_group("Enet\\include" FILES ${ENET_INCLUDE})
|
|
|
|
source_group("cURL" FILES ${CURL_FILES})
|
|
|
|
source_group("cURL\\include" FILES ${CURL_INCLUDE})
|
2013-08-29 00:21:27 +02:00
|
|
|
source_group("Gui" FILES ${GUI_FILES})
|
|
|
|
source_group("Imports" FILES ${IMPORTS_FILES})
|
|
|
|
source_group("kiss_fft130" FILES ${KISS_FILES})
|
2013-08-31 18:06:46 +02:00
|
|
|
source_group("json" FILES ${JSON_FILES})
|
|
|
|
source_group("json\\include" FILES ${JSON_INCLUDE})
|
2013-08-29 00:21:27 +02:00
|
|
|
source_group("poly2tri" FILES ${POLY2TRI_FILES})
|
|
|
|
source_group("poly2tri\\common" FILES ${POLY2TRI_COMMON_FILES})
|
|
|
|
source_group("poly2tri\\sweep" FILES ${POLY2TRI_SWEEP_FILES})
|
2013-08-31 18:06:46 +02:00
|
|
|
source_group("unzip" FILES ${UNZIP_FILES})
|
2013-08-29 00:21:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-31 02:08:01 +02:00
|
|
|
target_link_libraries(OpenSpades ${SDL_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${FLTK_OS_LIBS} ${ZLIB_LIBRARIES})
|
2013-08-29 00:21:27 +02:00
|
|
|
|
|
|
|
if(OPENAL_FOUND)
|
|
|
|
target_link_libraries(OpenSpades ${OPENAL_LIBRARY})
|
|
|
|
include_directories(${OPENAL_INCLUDE_DIRS})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(OpenSpades ws2_32.lib winmm.lib)
|
2013-08-31 02:23:30 +02:00
|
|
|
else()
|
|
|
|
target_link_libraries(OpenSpades Xext)
|
2013-08-29 00:21:27 +02:00
|
|
|
endif()
|