CMake files cleaning.

This commit is contained in:
f3nix 2008-06-06 12:39:00 +00:00
parent 1e1a1bb620
commit 6bb111cb8e
11 changed files with 40 additions and 57 deletions

View File

@ -78,11 +78,9 @@ include(${wxWidgets_USE_FILE})
# Include MinGW resource compiler. # Include MinGW resource compiler.
include(MinGWResourceCompiler) include(MinGWResourceCompiler)
if(UNIX) # Automagically create version header file.
# Automagically create version header file. include(CreateSVNVersionHeader)
include(CreateSVNVersionHeader) create_svn_version_header()
create_svn_version_header()
endif(UNIX)
# Include paths. # Include paths.
include_directories( include_directories(

View File

@ -1,13 +1,10 @@
# Generate a static library target named "bitmaps" # Generate a static library target named "bitmaps"
# (with filename libbitmaps.a on Linux) # (with filename libbitmaps.a on Linux)
# Copy the *.xmp files to bitmaps/${XMP_CPP_DIR}/${BASENAME}.cpp, on change only.
# Copy the *.xmp files to bitmaps/${XMP_CPP_DIR}/${basename}.cpp, on change only.
# Compile those *.cpp files and put them into the library, then done. # Compile those *.cpp files and put them into the library, then done.
set(BITMAP_SRCS
set( BITMAP_SRCS
3d.xpm 3d.xpm
Add_Arc.xpm Add_Arc.xpm
Add_Bus2Bus.xpm Add_Bus2Bus.xpm
@ -386,25 +383,23 @@ set( BITMAP_SRCS
viewlibs_icon.xpm viewlibs_icon.xpm
) )
# The name of the directory to put the copied and renamed *.xpm files into
# the name of the directory to put the copied and renamed *.xpm files into
# just below the bitmaps directory. As files are copied they are renamed to *.cpp. # just below the bitmaps directory. As files are copied they are renamed to *.cpp.
set( XMP_CPP_DIR auto_renamed_to_cpp ) set(XMP_CPP_DIR auto_renamed_to_cpp)
# get the path of the *.xpm files into "path" # Get the path of the *.xpm files into "PATH"
set( path ${CMAKE_CURRENT_SOURCE_DIR} ) set(PATH ${CMAKE_CURRENT_SOURCE_DIR})
# message( path\ =\ ${path} ) #message("PATH = ${PATH}")
foreach( loop_var ${BITMAP_SRCS} ) foreach(LOOP_VAR ${BITMAP_SRCS})
get_filename_component( basename ${loop_var} NAME_WE ) get_filename_component(BASENAME ${LOOP_VAR} NAME_WE)
set( cpp_bitmap ${path}/${XMP_CPP_DIR}/${basename}.cpp ) set(CPP_BITMAP "${PATH}/${XMP_CPP_DIR}/${BASENAME}.cpp")
add_custom_command( add_custom_command(
OUTPUT ${cpp_bitmap} OUTPUT ${CPP_BITMAP}
COMMAND cmake -E copy '${path}/${basename}.xpm' '${cpp_bitmap}' COMMAND cmake -E copy '${PATH}/${BASENAME}.xpm' '${CPP_BITMAP}'
DEPENDS ${basename}.xpm ) DEPENDS ${BASENAME}.xpm)
list( APPEND cpp_bitmaps ${cpp_bitmap} ) list(APPEND CPP_BITMAPS ${CPP_BITMAP})
SET_SOURCE_FILES_PROPERTIES( ${cpp_bitmap} PROPERTIES COMPILE_FLAGS -DXPMMAIN ) set_source_files_properties(${CPP_BITMAP} PROPERTIES COMPILE_FLAGS -DXPMMAIN)
endforeach( loop_var ) endforeach(LOOP_VAR)
add_library( bitmaps ${cpp_bitmaps} )
add_library(bitmaps ${CPP_BITMAPS})

View File

@ -1,5 +1,3 @@
include_directories(bitmaps)
set(COMMON_SRCS set(COMMON_SRCS
base_screen.cpp base_screen.cpp
base_struct.cpp base_struct.cpp
@ -18,7 +16,6 @@ set(COMMON_SRCS
edaappl.cpp edaappl.cpp
eda_dde.cpp eda_dde.cpp
eda_doc.cpp eda_doc.cpp
# edamenu.cpp
gestfich.cpp gestfich.cpp
get_component_dialog.cpp get_component_dialog.cpp
gr_basic.cpp gr_basic.cpp

View File

@ -2,7 +2,6 @@ add_definitions(-DCVPCB)
include_directories( include_directories(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
bitmaps
../3d-viewer ../3d-viewer
../pcbnew ../pcbnew
../polygon) ../polygon)

View File

@ -1,8 +1,6 @@
add_definitions(-DEESCHEMA) add_definitions(-DEESCHEMA)
include_directories( include_directories(${CMAKE_CURRENT_SOURCE_DIR})
${CMAKE_CURRENT_SOURCE_DIR}
bitmaps)
set(EESCHEMA_SRCS set(EESCHEMA_SRCS
affiche.cpp affiche.cpp
@ -27,6 +25,7 @@ set(EESCHEMA_SRCS
database.cpp database.cpp
delete.cpp delete.cpp
delsheet.cpp delsheet.cpp
# dialog_backanno.cpp
dialog_build_BOM.cpp dialog_build_BOM.cpp
# dialog_cmp_graphic_properties.cpp # dialog_cmp_graphic_properties.cpp
dialog_create_component.cpp dialog_create_component.cpp

View File

@ -2,7 +2,6 @@ add_definitions(-DGERBVIEW -DPCBNEW)
include_directories( include_directories(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
bitmaps
../3d-viewer ../3d-viewer
../cvpcb ../cvpcb
../pcbnew ../pcbnew
@ -35,6 +34,7 @@ set(GERBVIEW_SRCS
rs274x.cpp rs274x.cpp
select_layers_to_pcb.cpp select_layers_to_pcb.cpp
set_color.cpp set_color.cpp
# struct.cpp <-- not used
tool_gerber.cpp tool_gerber.cpp
tracepcb.cpp tracepcb.cpp
trpiste.cpp trpiste.cpp

View File

@ -1,7 +1,5 @@
add_definitions(-DKICAD) add_definitions(-DKICAD)
include_directories(bitmaps)
set(KICAD_SRCS set(KICAD_SRCS
buildmnu.cpp buildmnu.cpp
commandframe.cpp commandframe.cpp

View File

@ -3,7 +3,6 @@ add_definitions(-DPCBNEW)
include_directories( include_directories(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
bitmaps
../3d-viewer ../3d-viewer
../polygon) ../polygon)
@ -163,7 +162,7 @@ endif(APPLE)
add_executable(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${PCBNEW_RESOURCES}) add_executable(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${PCBNEW_RESOURCES})
target_link_libraries(pcbnew 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ) target_link_libraries(pcbnew 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES})
install(TARGETS pcbnew RUNTIME DESTINATION ${KICAD_BIN} install(TARGETS pcbnew RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary) COMPONENT binary)

View File

@ -1,4 +1,3 @@
PROJECT( kbool ) project(kbool)
SUBDIRS( src samples )
subdirs(src samples)

View File

@ -1,11 +1,11 @@
ADD_EXECUTABLE(boolonly boolonly.cpp) add_executable(boolonly boolonly.cpp)
IF(WIN32) if(WIN32)
ADD_DEFINITIONS( -D_MSWVC_ ) add_definitions(-D_MSWVC_)
ELSE(WIN32) else(WIN32)
ADD_DEFINITIONS( -D__UNIX__ ) add_definitions(-D__UNIX__)
ENDIF(WIN32) endif(WIN32)
INCLUDE_DIRECTORIES( ${kbool_SOURCE_DIR}/.. ) include_directories(${kbool_SOURCE_DIR}/..)
TARGET_LINK_LIBRARIES( boolonly kbool ) target_link_libraries(boolonly kbool)

View File

@ -1,8 +1,8 @@
IF(WIN32) if(WIN32)
ADD_DEFINITIONS( -D_MSWVC_ ) add_definitions(-D_MSWVC_)
ELSE(WIN32) else(WIN32)
ADD_DEFINITIONS( -D__UNIX__ ) add_definitions(-D__UNIX__)
ENDIF(WIN32) endif(WIN32)
include_directories(${kbool_SOURCE_DIR}/include) include_directories(${kbool_SOURCE_DIR}/include)
@ -17,5 +17,4 @@ set(KBOOL_SRCS
record.cpp record.cpp
scanbeam.cpp) scanbeam.cpp)
ADD_LIBRARY( kbool ${KBOOL_SRCS}) add_library(kbool ${KBOOL_SRCS})