2009-05-06 09:12:12 +00:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
project( musikCube )
|
|
|
|
|
2009-07-18 11:50:49 +00:00
|
|
|
set ( musikCube_VERSION_MAJOR 2)
|
|
|
|
set ( musikCube_VERSION_MINOR 0)
|
|
|
|
|
2011-02-17 00:22:30 +00:00
|
|
|
set (CMAKE_MODULE_PATH ${musikCube_SOURCE_DIR}/modules)
|
2009-07-18 11:50:49 +00:00
|
|
|
|
|
|
|
set (BOOST_LIBS
|
|
|
|
system
|
|
|
|
date_time
|
|
|
|
filesystem
|
|
|
|
iostreams
|
|
|
|
thread
|
|
|
|
regex
|
|
|
|
)
|
|
|
|
|
2011-02-17 00:22:30 +00:00
|
|
|
include_directories(${musikCube_SOURCE_DIR}/src/3rdparty/lib)
|
|
|
|
|
2009-07-18 11:50:49 +00:00
|
|
|
set (Boost_ADDITIONAL_VERSIONS "1.37.0" )
|
|
|
|
if(WIN32 AND NOT UNIX)
|
2011-02-10 13:11:38 +00:00
|
|
|
find_package(Boost 1.42.0 REQUIRED ${BOOST_LIBS} )
|
2009-07-18 11:50:49 +00:00
|
|
|
if (Boost_FOUND)
|
2011-02-18 14:51:09 +00:00
|
|
|
add_definitions (
|
|
|
|
-DHAVE_BOOST
|
|
|
|
)
|
|
|
|
#set (BOOST_LINK_LIBS
|
|
|
|
# ${Boost_LIBRARIES})
|
2011-02-10 13:11:38 +00:00
|
|
|
include_directories (${Boost_INCLUDE_DIRS})
|
2011-02-18 14:51:09 +00:00
|
|
|
link_directories(${Boost_LIBRARY_DIRS})
|
|
|
|
#message(STATUS "Boost includes: " ${Boost_INCLUDE_DIRS})
|
|
|
|
#message(STATUS "Boost libs: " ${Boost_LIBRARIES})
|
2011-02-07 15:03:09 +00:00
|
|
|
else (Boost_FOUND)
|
|
|
|
set (BOOST_LINK_LIBS
|
|
|
|
boost_system
|
|
|
|
boost_iostreams
|
|
|
|
boost_filesystem
|
|
|
|
boost_thread
|
|
|
|
boost_regex
|
|
|
|
boost_date_time
|
|
|
|
)
|
|
|
|
include_directories ("${musikCube_SOURCE_DIR}/src/3rdparty/boost")
|
2009-07-18 11:50:49 +00:00
|
|
|
endif (Boost_FOUND)
|
2011-02-24 12:34:31 +00:00
|
|
|
#set (VLD_ROOT_DIR ${musikCube_SOURCE_DIR}/src/3rdparty/lib)
|
|
|
|
#set (VLD_INCLUDE_DIR ${musikCube_SOURCE_DIR}/src/3rdparty/include)
|
|
|
|
#find_package(vld REQUIRED)
|
|
|
|
#if (VLD_FOUND)
|
|
|
|
# message(STATUS "VLD Found")
|
|
|
|
# link_directories(${VLD_LIBRARIES_DIR})
|
|
|
|
#else (VLD_FOUND)
|
|
|
|
# message(STATUS "VLD not found")
|
|
|
|
#endif (VLD_FOUND)
|
2011-02-23 13:15:27 +00:00
|
|
|
add_definitions (
|
|
|
|
-DUNICODE
|
2011-02-24 15:00:44 +00:00
|
|
|
-D_UNICODE
|
2011-02-23 13:15:27 +00:00
|
|
|
)
|
2009-07-18 11:50:49 +00:00
|
|
|
else(WIN32 AND NOT UNIX)
|
2011-02-10 13:11:38 +00:00
|
|
|
find_package(Boost 1.42.0 REQUIRED ${BOOST_LIBS})
|
2011-02-06 23:12:29 +00:00
|
|
|
if(Boost_FOUND)
|
|
|
|
add_definitions (-DHAVE_BOOST
|
|
|
|
-D_FILE_OFFSET_BITS=64)
|
|
|
|
set (BOOST_LINK_LIBS
|
|
|
|
${Boost_LIBRARIES})
|
|
|
|
# message(STATUS "Libs: " ${BOOST_LINK_LIBS})
|
|
|
|
# message(STATUS "Includes: " ${Boost_INCLUDE_DIRS})
|
|
|
|
else(Boost_FOUND)
|
|
|
|
set (BOOST_LINK_LIBS
|
|
|
|
boost_system
|
|
|
|
boost_iostreams
|
|
|
|
boost_filesystem
|
|
|
|
boost_thread
|
|
|
|
boost_regex
|
|
|
|
boost_date_time
|
|
|
|
)
|
2011-02-07 15:03:09 +00:00
|
|
|
include_directories ("${musikCube_SOURCE_DIR}/src/3rdparty/boost")
|
2011-02-06 23:12:29 +00:00
|
|
|
endif(Boost_FOUND)
|
2009-07-18 11:50:49 +00:00
|
|
|
find_package(Qt4 REQUIRED)
|
|
|
|
#add_definitions(${QT_DEFINITIONS})
|
|
|
|
#include_directories(${QT_INCLUDE_DIR})
|
|
|
|
set (linux_LINK_LIBS
|
|
|
|
dl
|
|
|
|
expat
|
|
|
|
)
|
2011-02-16 15:18:25 +00:00
|
|
|
#include_directories( "/usr/include/taglib" )
|
2011-01-24 07:48:04 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}
|
2009-07-18 11:50:49 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Modules )
|
2011-02-03 17:41:20 +00:00
|
|
|
#include(UseDoxygen)
|
2011-01-24 07:48:04 +00:00
|
|
|
set(DOXYFILE_OUTPUT_DIRECTORY docs)
|
|
|
|
endif(WIN32 AND NOT UNIX)
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2009-05-06 09:12:12 +00:00
|
|
|
SET (CMAKE_BUILD_TYPE DEBUG)
|
2011-02-10 13:11:38 +00:00
|
|
|
set (LIBRARY_OUTPUT_PATH ${musikCube_SOURCE_DIR}/bin/plugins)
|
2009-07-18 11:50:49 +00:00
|
|
|
set (EXECUTABLE_OUTPUT_PATH ${musikCube_SOURCE_DIR}/bin)
|
|
|
|
|
2011-02-10 13:11:38 +00:00
|
|
|
link_directories (${musikCube_SOURCE_DIR}/bin/plugins)
|
2009-07-18 11:50:49 +00:00
|
|
|
|
|
|
|
set (musikCube_LINK_LIBS
|
|
|
|
${linux_LINK_LIBS}
|
2011-02-06 23:12:29 +00:00
|
|
|
${BOOST_LINK_LIBS}
|
2009-07-18 11:50:49 +00:00
|
|
|
sqlite3
|
|
|
|
md5
|
|
|
|
)
|
|
|
|
|
2011-02-10 13:11:38 +00:00
|
|
|
include_directories (
|
2009-07-18 11:50:49 +00:00
|
|
|
"${musikCube_SOURCE_DIR}/src"
|
|
|
|
"${musikCube_SOURCE_DIR}/src/core"
|
2011-02-17 00:22:30 +00:00
|
|
|
"${musikCube_SOURCE_DIR}/src/core/audio"
|
2009-07-18 11:50:49 +00:00
|
|
|
"${musikCube_SOURCE_DIR}/src/3rdparty/include")
|
2009-05-06 09:12:12 +00:00
|
|
|
|
2009-07-18 11:50:49 +00:00
|
|
|
add_subdirectory(src/3rdparty)
|
2009-05-06 09:12:12 +00:00
|
|
|
add_subdirectory(src/core)
|
2009-07-18 11:50:49 +00:00
|
|
|
add_subdirectory(src/contrib)
|
2011-02-25 14:06:21 +00:00
|
|
|
add_subdirectory(src/win32cpp)
|
|
|
|
add_subdirectory(src/server)
|
2011-01-27 16:51:14 +00:00
|
|
|
add_subdirectory(src/square)
|
2009-07-18 11:50:49 +00:00
|
|
|
#add_subdirectory(src/cube)
|