Skip to content

Commit

Permalink
Updated CMake script.
Browse files Browse the repository at this point in the history
  • Loading branch information
AYESDIE committed Mar 11, 2020
1 parent eaafbcb commit 7462e81
Show file tree
Hide file tree
Showing 36 changed files with 164 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,8 @@ synfig-studio/doc
/ETL/nbproject/
/synfig-core/nbproject/
/synfig-studio/nbproject/

# ------------------------------------------------------------------------
# CLion projects
# ------------------------------------------------------------------------
/.idea
2 changes: 1 addition & 1 deletion ETL/ETL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ set(ETL_HEADERS

install(
FILES ${ETL_HEADERS}
DESTINATION include/ETL
DESTINATION ${CMAKE_BINARY_DIR}/include/ETL
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/lyr_freetype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ install (
TARGETS lyr_freetype
DESTINATION lib/synfig/modules
)

set_target_properties(lyr_freetype
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/lyr_std/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ install (
TARGETS lyr_std
DESTINATION lib/synfig/modules
)

set_target_properties(lyr_std
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_bmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ install (
TARGETS mod_bmp
DESTINATION lib/synfig/modules
)

set_target_properties(mod_bmp
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_dv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ install (
TARGETS mod_dv
DESTINATION lib/synfig/modules
)

set_target_properties(mod_dv
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ install (
TARGETS mod_example
DESTINATION lib/synfig/modules
)

set_target_properties(mod_example
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_ffmpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ install (
TARGETS mod_ffmpeg
DESTINATION lib/synfig/modules
)

set_target_properties(mod_ffmpeg
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_filter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ install (
TARGETS mod_filter
DESTINATION lib/synfig/modules
)

set_target_properties(mod_filter
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ install (
TARGETS mod_geometry
DESTINATION lib/synfig/modules
)

set_target_properties(mod_geometry
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_gif/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ install (
TARGETS mod_gif
DESTINATION lib/synfig/modules
)

set_target_properties(mod_gif
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_gradient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ install (
TARGETS mod_gradient
DESTINATION lib/synfig/modules
)

set_target_properties(mod_gradient
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_imagemagick/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ install (
TARGETS mod_imagemagick
DESTINATION lib/synfig/modules
)

set_target_properties(mod_imagemagick
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_jpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ install (
TARGETS mod_jpeg
DESTINATION lib/synfig/modules
)

set_target_properties(mod_jpeg
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_libavcodec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ install (
TARGETS mod_libavcodec
DESTINATION lib/synfig/modules
)

set_target_properties(mod_libavcodec
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_magickpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ install (
TARGETS mod_magickpp
DESTINATION lib/synfig/modules
)

set_target_properties(mod_magickpp
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_mng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ install (
TARGETS mod_mng
DESTINATION lib/synfig/modules
)

set_target_properties(mod_mng
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_noise/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ install (
TARGETS mod_noise
DESTINATION lib/synfig/modules
)

set_target_properties(mod_noise
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_openexr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ install (
TARGETS mod_openexr
DESTINATION lib/synfig/modules
)

set_target_properties(mod_openexr
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_particle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ install (
TARGETS mod_particle
DESTINATION lib/synfig/modules
)

set_target_properties(mod_particle
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_png/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ install (
TARGETS mod_png
DESTINATION lib/synfig/modules
)

set_target_properties(mod_png
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_ppm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ install (
TARGETS mod_ppm
DESTINATION lib/synfig/modules
)

set_target_properties(mod_ppm
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_svg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ install (
TARGETS mod_svg
DESTINATION lib/synfig/modules
)

set_target_properties(mod_svg
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
5 changes: 5 additions & 0 deletions synfig-core/src/modules/mod_yuv420p/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ install (
TARGETS mod_yuv420p
DESTINATION lib/synfig/modules
)

set_target_properties(mod_yuv420p
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/synfig/modules"
)
8 changes: 7 additions & 1 deletion synfig-core/src/synfig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ file(GLOB SYNFIG_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${SYNFIG_HEADERS}
DESTINATION include/synfig
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig
)

install(
Expand All @@ -158,3 +158,9 @@ install(
FILE "${PROJECT_NAME}-config.cmake"
DESTINATION "lib/cmake/${PROJECT_NAME}"
)

set_target_properties(synfig
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)
2 changes: 1 addition & 1 deletion synfig-core/src/synfig/color/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ set(COLOR_HEADERS ${COLOR_HEADERS} "${CMAKE_CURRENT_LIST_DIR}/color.hpp")

install(
FILES ${COLOR_HEADERS}
DESTINATION include/synfig/color
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/color
)
2 changes: 1 addition & 1 deletion synfig-core/src/synfig/debug/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ file(GLOB DEBUG_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${DEBUG_HEADERS}
DESTINATION include/synfig/debug
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/debug
)
2 changes: 1 addition & 1 deletion synfig-core/src/synfig/layers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ file(GLOB LAYERS_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${LAYERS_HEADERS}
DESTINATION include/synfig/layers
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/layers
)
2 changes: 1 addition & 1 deletion synfig-core/src/synfig/rendering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ file(GLOB RENDERING_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${RENDERING_HEADERS}
DESTINATION include/synfig/rendering
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/rendering
)

## TODO: make configurable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ target_sources(synfig
"${CMAKE_CURRENT_LIST_DIR}/optimizertransformation.cpp"
"${CMAKE_CURRENT_LIST_DIR}/optimizerpass.cpp"
)

file(GLOB OPTIMIZERS_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${OPTIMIZERS_HEADERS}
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/rendering/common/optimizers
)
7 changes: 6 additions & 1 deletion synfig-core/src/synfig/rendering/common/task/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ target_sources(synfig
"${CMAKE_CURRENT_LIST_DIR}/tasktransformation.cpp"
)

install_all_headers(rendering/common/task)
file(GLOB TASK_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${TASK_HEADERS}
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/rendering/common/task
)
7 changes: 6 additions & 1 deletion synfig-core/src/synfig/rendering/primitive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ target_sources(synfig
"${CMAKE_CURRENT_LIST_DIR}/transformationaffine.cpp"
)

install_all_headers(rendering/primitive)
file(GLOB PRIMITIVE_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${PRIMITIVE_HEADERS}
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/rendering/primitive
)
7 changes: 6 additions & 1 deletion synfig-core/src/synfig/rendering/software/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ target_sources(synfig
include(${CMAKE_CURRENT_LIST_DIR}/function/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/task/CMakeLists.txt)

install_all_headers(rendering/software)
file(GLOB SOFTWARE_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${SOFTWARE_HEADERS}
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/rendering
)
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ target_sources(synfig
"${CMAKE_CURRENT_LIST_DIR}/resample.cpp"
)

install_all_headers(rendering/software/function)
file(GLOB FUNCTION_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${FUNCTION_HEADERS}
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/rendering/software/function
)
2 changes: 1 addition & 1 deletion synfig-core/src/synfig/valuenodes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ file(GLOB VALUENODES_HEADERS "${CMAKE_CURRENT_LIST_DIR}/*.h")

install(
FILES ${VALUENODES_HEADERS}
DESTINATION include/synfig/valuenodes
DESTINATION ${CMAKE_BINARY_DIR}/include/synfig/valuenodes
)
5 changes: 5 additions & 0 deletions synfig-core/src/tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ target_link_libraries(synfig_bin
${GIOMM_LIBRARIES}
)

set_target_properties(synfig_bin
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)

install (
TARGETS synfig_bin
DESTINATION bin
Expand Down

0 comments on commit 7462e81

Please sign in to comment.