[CMake] CPack: debugging project.nsi file - unknown variable
Torri, Stephen CIV NSWCDD, W15
stephen.torri at navy.mil
Tue Jun 8 11:21:53 EDT 2010
Now that I have a libraries being linked in correctly its time to move to using CPack. The cpack utility failed to execute "makensis.exe project.nsi". When I looked in the NSISOutput.log I see a few warnings:
warning: unknown variable/constant "{headers}" detected, ignoring (macro:Deselect_required_by_libraries:1)
warning: unknown variable/constant "{headers}" detected, ignoring (macro:Deselect_required_by_libraries:4)
Followed by some errors:
Error in macro Deselect_required_by_libraries on macroline 5
Error in macro MaybeSelectionChanged on macroline 10
Error in macro SectionList on macroline 3
Error in script "project.nsi" on line 831 -- aborting creation process
After look at the script I found the first offending macro:
!macro Deselect_required_by_libraries
SectionGetFlags ${headers} $0
IntOp $1 ${SF_SELECTED} ~
IntOp $0 $0 & $1
SectionSetFlags ${headers} $0
IntOp $headers_selected 0 + 0
!macroend
I must have failed to set something up in either the project CMakeLists.txt file or a child project. Where is ${headers} defined? In my project's CMakeLists.txt files I typically grouped my headers by:
FILE (GLOB HEADERS *.h)
Which then I used that variable in the file as:
add_library ( child ${SOURCE} ${HEADERS} )
INSTALL ( FILES ${HEADERS} DESTINATION include/${PROJECT_NAME}/child )
The INSTALL line was written for Linux so I will have to change that for Windows. I would want the headers to be installed in the installation directory on Windows like:
C:\Program Files\Project\include
I am not sure what files are best to send to help debug this problem.
Stephen
Stephen Torri, PhD
NAVAL SURFACE WARFARE CENTER DAHLGREN
17214 Ave B Suite 121
Dahlgren, Va. 22448
540-653-1082
I am not a contracting officer. I cannot modify or initiate contracts, nor do I have the authority to financially commit the government in any way.
More information about the CMake
mailing list