Skip to content

Commit

Permalink
Cleanup: CMake style
Browse files Browse the repository at this point in the history
Use parens on newline, avoids diff-noise when adding values.
  • Loading branch information
ideasman42 committed Jul 22, 2016
1 parent fef27f0 commit 9ece9c0
Show file tree
Hide file tree
Showing 22 changed files with 214 additions and 104 deletions.
9 changes: 6 additions & 3 deletions plugins/blur/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ set(PLUGINSDK_UTILS_PATH ../)

set(HEADERS
${PLUGINSDK_ROOT}/toonz_plugin.h
${PLUGINSDK_ROOT}/toonz_hostif.h)
${PLUGINSDK_ROOT}/toonz_hostif.h
)

set(SOURCES
blur.cpp)
blur.cpp
)

if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
Expand All @@ -17,6 +19,7 @@ add_library(blur SHARED ${HEADERS} ${SOURCES})

set_target_properties(blur PROPERTIES
PREFIX ""
SUFFIX ".plugin")
SUFFIX ".plugin"
)

include_directories(${PLUGINSDK_ROOT} ${PLUGINSDK_UTILS_PATH})
9 changes: 6 additions & 3 deletions plugins/geom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ set(PLUGINSDK_UTILS_PATH ../)

set(HEADERS
${PLUGINSDK_ROOT}/toonz_plugin.h
${PLUGINSDK_ROOT}/toonz_hostif.h)
${PLUGINSDK_ROOT}/toonz_hostif.h
)

set(SOURCES
geom.cpp)
geom.cpp
)

if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
Expand All @@ -18,6 +20,7 @@ add_library(geom SHARED ${HEADERS} ${SOURCES})

set_target_properties(geom PROPERTIES
PREFIX ""
SUFFIX ".plugin")
SUFFIX ".plugin"
)

include_directories(${PLUGINSDK_ROOT} ${PLUGINSDK_UTILS_PATH})
9 changes: 6 additions & 3 deletions plugins/multiplugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ set(PLUGINSDK_UTILS_PATH ../)

set(HEADERS
${PLUGINSDK_ROOT}/toonz_plugin.h
${PLUGINSDK_ROOT}/toonz_hostif.h)
${PLUGINSDK_ROOT}/toonz_hostif.h
)

set(SOURCES
multi.cpp)
multi.cpp
)

if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
Expand All @@ -17,6 +19,7 @@ add_library(multi SHARED ${HEADERS} ${SOURCES})

set_target_properties(multi PROPERTIES
PREFIX ""
SUFFIX ".plugin")
SUFFIX ".plugin"
)

include_directories(${PLUGINSDK_ROOT} ${PLUGINSDK_UTILS_PATH})
21 changes: 14 additions & 7 deletions toonz/sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ find_package(Qt5 REQUIRED
Widgets
PrintSupport
LinguistTools
Multimedia)
Multimedia
)

if(WIN32)
include_directories(
Expand Down Expand Up @@ -200,15 +201,18 @@ if(WIN32)
set(GL_LIB opengl32.lib)
set(Z_LIB
optimized ${SDKROOT}/zlib-1.2.8/lib/zlib-1.2.8_${MSVC_LIB_VERSION}${PLATFORM2}.lib
debug ${SDKROOT}/zlib-1.2.8/lib/zlib-1.2.8_${MSVC_LIB_VERSION}${PLATFORM2}d.lib)
debug ${SDKROOT}/zlib-1.2.8/lib/zlib-1.2.8_${MSVC_LIB_VERSION}${PLATFORM2}d.lib
)
set(JPEG_LIB ${SDKROOT}/LibJPEG/jpeg-9/lib/LibJPEG-9_${MSVC_LIB_VERSION}${PLATFORM2}.lib)
set(TIFF_INCLUDE_DIR ${SDKROOT}/tiff-4.0.3/libtiff)
set(TIFF_LIB
optimized ${SDKROOT}/tiff-4.0.3/lib/LibTIFF-4.0.3_${MSVC_LIB_VERSION}${PLATFORM2}.lib
debug ${SDKROOT}/tiff-4.0.3/lib/LibTIFF-4.0.3_${MSVC_LIB_VERSION}${PLATFORM2}d.lib)
debug ${SDKROOT}/tiff-4.0.3/lib/LibTIFF-4.0.3_${MSVC_LIB_VERSION}${PLATFORM2}d.lib
)
set(PNG_LIB
optimized ${SDKROOT}/libpng-1.6.21/lib/libpng16_${MSVC_LIB_VERSION}${PLATFORM2}.lib
debug ${SDKROOT}/libpng-1.6.21/lib/libpng16_${MSVC_LIB_VERSION}${PLATFORM2}d.lib)
debug ${SDKROOT}/libpng-1.6.21/lib/libpng16_${MSVC_LIB_VERSION}${PLATFORM2}d.lib
)
set(GLEW_LIB ${SDKROOT}/glew/glew-1.9.0/lib/glew${PLATFORM}.lib)
set(LZ4_LIB ${SDKROOT}/Lz4/Lz4_131/lz4_${PLATFORM}.lib)
set(SUPERLU_LIB ${SDKROOT}/superlu/SuperLU_${MSVC_LIB_VERSION}_${PLATFORM}.lib)
Expand Down Expand Up @@ -421,14 +425,16 @@ function(add_translation module)
set(name "${CMAKE_SOURCE_DIR}/translations/${lang}/${module}.ts")
list(APPEND translation ${name})
set_source_files_properties(${name} PROPERTIES
OUTPUT_LOCATION "${CMAKE_BINARY_DIR}/loc/${lang}")
OUTPUT_LOCATION "${CMAKE_BINARY_DIR}/loc/${lang}"
)
endforeach()

qt5_create_translation(message ${translation} ${ARGN})

add_custom_target("translation_${module}" DEPENDS ${message})
set_target_properties("translation_${module}" PROPERTIES
EXCLUDE_FROM_DEFAULT_BUILD TRUE)
EXCLUDE_FROM_DEFAULT_BUILD TRUE
)
endfunction()

set(CMAKE_C_FLAGS "${C_WARNINGS} ${CMAKE_C_FLAGS}")
Expand Down Expand Up @@ -466,5 +472,6 @@ if(APPLE)
add_custom_command(TARGET executable
POST_BUILD COMMAND
${CMAKE_INSTALL_NAME_TOOL} -add_rpath ${CMAKE_INSTALL_RPATH}
$<TARGET_FILE:executable>)
$<TARGET_FILE:executable>
)
endif()
6 changes: 4 additions & 2 deletions toonz/sources/colorfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ set(HEADERS
rasterstyles.h
regionstyles.h
strokestyles.h
zigzagstyles.h)
zigzagstyles.h
)

set(SOURCES
colorfx.cpp
colorfxutils.cpp
rasterstyles.cpp
regionstyles.cpp
strokestyles.cpp
zigzagstyles.cpp)
zigzagstyles.cpp
)

add_translation(colorfx ${HEADERS} ${SOURCES})

Expand Down
40 changes: 26 additions & 14 deletions toonz/sources/image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ set(HEADERS
../include/tnzimage.h
mov/tiio_mov_proxy.h
3gp/tiio_3gp_proxy.h
mesh/tiio_mesh.h)
mesh/tiio_mesh.h
)

set(SOURCES
tiio.cpp
Expand All @@ -46,31 +47,38 @@ set(SOURCES
tzl/tiio_tzl.cpp
mov/tiio_mov_proxy.cpp
3gp/tiio_3gp_proxy.cpp
mesh/tiio_mesh.cpp)
mesh/tiio_mesh.cpp
)

if(WIN32)
set(HEADERS ${HEADERS}
avi/tiio_avi.h
mov/tiio_mov.h
3gp/tiio_3gp.h)
3gp/tiio_3gp.h
)
set(SOURCES ${SOURCES}
avi/tiio_avi.cpp
mov/tiio_movW.cpp
3gp/tiio_3gpW.cpp)
3gp/tiio_3gpW.cpp
)
else()
set(HEADERS ${HEADERS}
mov/tiio_movM.h
3gp/tiio_3gpM.h)
3gp/tiio_3gpM.h
)
set(SOURCES ${SOURCES}
mov/tiio_movM.cpp
3gp/tiio_3gpM.cpp)
3gp/tiio_3gpM.cpp
)
elseif(UNIX)
set(HEADERS ${HEADERS}
3gp/tiio_3gp_proxy.h
mov/tiio_mov_proxy.h)
mov/tiio_mov_proxy.h
)
set(SOURCES ${SOURCES}
mov/tiio_mov_proxy.cpp
3gp/tiio_3gp_proxy.cpp)
3gp/tiio_3gp_proxy.cpp
)
endif()

add_library(image SHARED ${HEADERS} ${SOURCES})
Expand Down Expand Up @@ -115,29 +123,33 @@ endif()
if(WIN32)
set(EXTRA_LIBS
${TNZLIBS}
vfw32.lib)
vfw32.lib
)
elseif(APPLE)
if(PLATFORM EQUAL 32)
find_library(CORE_SERVICES_LIB CoreServices)
set(OSX_10_6_SDK_PATH "")
if(NOT OSX_10_6_SDK_PATH)
message(FATAL_ERROR "Set variable 'OSX_10_6_SDK_PATH'")
message(FATAL_ERROR "Set variable 'OSX_10_6_SDK_PATH'")
endif()
find_library(QD_LIB
NAMES QD
PATHS OSX10_6_SDK_PATH)
NAMES QD
PATHS OSX10_6_SDK_PATH
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -F ${OSX_10_6_SDK_PATH}")
endif()
set(EXTRA_LIBS
${TNZLIBS}
${QT_LIB}
${CARBON_LIB}
${CORE_SERVICES_LIB}
${QD_LIB})
${QD_LIB}
)
else()
# Generic Unix
set(EXTRA_LIBS
${TNZLIBS})
${TNZLIBS}
)
endif()

target_link_libraries(image Qt5::Core Qt5::Network ${Z_LIB} ${GLUT_LIB} ${GL_LIB} ${JPEG_LIB} ${TIFF_LIB} ${PNG_LIB} ${EXTRA_LIBS})
6 changes: 4 additions & 2 deletions toonz/sources/sound/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ set(HEADERS
aiff/tsio_aiff.h
raw/tsio_raw.h
../include/tnzsound.h
tsio.h)
tsio.h
)

set(SOURCES
tsio.cpp
tsioutils.cpp
wav/tsio_wav.cpp
aiff/tsio_aiff.cpp
raw/tsio_raw.cpp)
raw/tsio_raw.cpp
)

add_library(sound SHARED ${HEADERS} ${SOURCES})
add_definitions(
Expand Down
6 changes: 4 additions & 2 deletions toonz/sources/stdfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ set(HEADERS
iwa_simplexnoise.h
iwa_noise1234.h
iwa_fresnel.h
iwa_pnperspectivefx.h)
iwa_pnperspectivefx.h
)

set(SOURCES
adjustlevelsfx.cpp
Expand Down Expand Up @@ -242,7 +243,8 @@ set(SOURCES
iwa_tilefx.cpp
iwa_simplexnoise.cpp
iwa_noise1234.cpp
iwa_pnperspectivefx.cpp)
iwa_pnperspectivefx.cpp
)

set(OBJCSOURCES
)
Expand Down
9 changes: 6 additions & 3 deletions toonz/sources/t32bitsrv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ add_executable(t32bitsrv
t32fontmsg.cpp
t32fontmsg.h
t32movmsg.cpp
t32movmsg.h)
t32movmsg.h
)

if(WIN32)
include_directories(
Expand All @@ -18,7 +19,8 @@ target_link_libraries(t32bitsrv
Qt5::Core
Qt5::Network
tnzcore
image)
image
)

if(APPLE AND PLATFORM EQUAL 32)
get_target_property(bin t32bitsrv LOCATION)
Expand All @@ -33,5 +35,6 @@ if(APPLE AND PLATFORM EQUAL 32)

add_custom_command(TARGET t32bitsrv
POST_BUILD COMMAND
${CMAKE_INSTALL_NAME_TOOL} -add_rpath @executable_path/. ${bin})
${CMAKE_INSTALL_NAME_TOOL} -add_rpath @executable_path/. ${bin}
)
endif()
6 changes: 4 additions & 2 deletions toonz/sources/tcleanupper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
add_executable(tcleanup
tcleanupper.cpp)
tcleanupper.cpp
)

target_link_libraries(tcleanup
Qt5::Core
Qt5::Widgets
tfarm
image)
image
)
6 changes: 4 additions & 2 deletions toonz/sources/tcomposer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
add_executable(tcomposer
tcomposer.cpp)
tcomposer.cpp
)

target_link_libraries(tcomposer
Qt5::Core
Expand All @@ -11,4 +12,5 @@ target_link_libraries(tcomposer
sound
image
colorfx
toonzqt)
toonzqt
)
6 changes: 4 additions & 2 deletions toonz/sources/tconverter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
add_executable(tconverter
tconverter.cpp)
tconverter.cpp
)

target_link_libraries(tconverter
Qt5::Core
toonzlib
image)
image
)
Loading

0 comments on commit 9ece9c0

Please sign in to comment.