Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Building TheIDE with using CMake
Re: Building TheIDE with using CMake [message #44261 is a reply to message #44260] Fri, 13 February 2015 19:23 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
cyrion wrote on Fri, 13 February 2015 17:55
Yeah, it's working :)
Quite ugly, but I manually added the icpp files to the application target to make it sure they are linked with it, and everything ok!

I updated the link to "init" files in packages topic for above message.

What you did with *.icpp files are created automatically by current TheIDE inside of init U++ package files.

For example, I wrote following add_init_function, from case 3:
function(add_init_file init_file copied_file)
	# Creates ${init_file}.cpp inside binary directory with #include path to ${init_file}
	# and returns the path to copied_file
	set(input_file ${CMAKE_CURRENT_SOURCE_DIR}/${init_file})
	if(EXISTS "${input_file}")
		set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${init_file}.cpp")
		file(WRITE "${output_file}" "#include \"${input_file}\"\n")
		set(${copied_file} "${output_file}" PARENT_SCOPE)
	endif()
endfunction()


For example, inside of CtrlCore CMakeLists.txt file:
# Header files
set(H_LIST
)
# Compilable files
set(SRC_LIST
)
# The *.icpp files. Just to edit/view them inside of IDEs
set(ISRC_LIST
	CtrlCore.icpp
)

set_source_files_properties(${H_LIST} ${ISRC_LIST} PROPERTIES HEADER_FILE_ONLY ON)

add_init_file(init INIT_FILE)
add_library(CtrlCore ${INIT_FILE} ${SRC_LIST} ${H_LIST} ${ISRC_LIST})

# And so on

[Updated on: Fri, 13 February 2015 19:24]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: plugin/wav does not compile on clang or mingw on windows
Next Topic: New STEM4U package
Goto Forum:
  


Current Time: Sat May 11 21:10:02 CEST 2024

Total time taken to generate the page: 0.03713 seconds