16
General discussions / New naming convention
« on: January 17, 2012, 04:36:56 am »
I support Laurent's proposed changes for his exact reasoning. I use a lot of Qt and it would make my code feel more consistent.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
cmake_minimum_required(VERSION 2.8)
project(sfml)
file(GLOB sfml_SRC
src/SFML/Audio/*.cpp
src/SFML/Window/*.cpp
src/SFML/Window/Linux/*.cpp
src/SFML/System/*.cpp
src/SFML/System/Unix/*.cpp
src/SFML/Graphics/*.cpp
src/SFML/Network/*.cpp
src/SFML/Network/Unix/*.cpp)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(OpenAL REQUIRED)
find_package(OpenGL REQUIRED)
find_package(Freetype REQUIRED)
find_package(GLEW REQUIRED)
find_package(JPEG REQUIRED)
find_package(X11 REQUIRED)
find_package(ZLIB REQUIRED)
find_package(Sndfile REQUIRED)
include_directories(${OPENAL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}
${FREETYPE_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ${JPEG_INCLUDE_DIR}
${X11_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} ${SNDFILE_INCLUDE_DIR})
include_directories(src include)
add_library(sfml SHARED ${sfml_SRC})
target_link_libraries(sfml ${OPENAL_LIBRARY} ${OPENGL_LIBRARIES}
${FREETYPE_LIBRARIES} ${GLEW_LIBRARY} ${JPEG_LIBRARIES} ${X11_LIBRARIES}
${ZLIB_LIBRARIES} ${SNDFILE_LIBRARIES})
$ wc -l CMakeLists.txt
34 CMakeLists.txt
Quote from: "Svenstaro"I feel rather comfortable in CMake and the script language is really the only thing I dislike. It is easy to make a cross-platform project with CMake and it has a lot of Find* scripts to locate things on various systems even when cross-compiling.
Premake might have all that but seriously, CMake works and isn't broken. What is the issue here?
Was the build system in place before CMake broken? Probably not.