Commit 21a9ad6f authored by Jan Möbius's avatar Jan Möbius
Browse files

Dennis CMAKE Documentation

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5867 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8d5e75b1
include (common)
# find needed packages
find_package (OpenGL)
find_package (GLUT)
find_package (GLEW)
......@@ -19,6 +20,7 @@ link_directories (
${GLEW_LIBRARY_DIR}
)
# source code directories
set (directories
.
Geometry
......@@ -35,21 +37,26 @@ set (directories
Utils
)
# generate dllexport macros on windows
if (WIN32)
add_definitions(-DACGDLL)
endif ()
# collect all header,source and ui files
append_files (headers "*.hh" ${directories})
append_files (sources "*.cc" ${directories})
append_files (ui "*.ui" ${directories})
# remove template cc files from source file list
drop_templates (sources)
# genereate uic and moc targets
qt4_autouic (uic_targets ${ui})
qt4_automoc (moc_targets ${headers})
add_library (ACG SHARED ${uic_targets} ${sources} ${headers} ${moc_targets})
# set common target properties defined in common.cmake
set_target_props (ACG)
target_link_libraries (ACG
......@@ -62,11 +69,16 @@ target_link_libraries (ACG
${FTGL_LIBS}
)
# no install on mac, because the whole bundle will be installed in the
# toplevel CMakeLists.txt
if (NOT APPLE)
install (TARGETS ACG DESTINATION ${OPENFLIPPER_LIBDIR})
endif ()
if (WIN32)
# copy dll file to "Build" directory
# Visual studio will create this file in a subdirectory so we can't use
# LIBRARY_OUTPUT_DIRECTORY directly here
add_custom_command (TARGET ACG POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_if_different
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment